# nmsurv2

Calculates maximum likelihood estimates using Nelder Mead's simplex method for bivariate data

## Contents

## Syntax

[q, info] = **nmsurv2**(func, p, t, y, Z)

## Description

Calculates maximum likelihood estimates using Nelder Mead's simplex method for bivariate data

Input

- func: string with name of user-defined function

f = func (p, t, y) with p: np-vector; t: nt-vector; y: ny-vector f: (nt,ny)-matrix with model-predictions for surviving numbers

- p: (np,2) matrix with

p(:,1) initial guesses for parameter values p(:,2) binaries with yes or no iteration (optional)

- t: (nt,1)-vector with first independent variable (time)
- y: (ny,1)-vector with second independent variable
- Z: (nx,ny)-matrix with surviving numbers

Output

- q: matrix like p, but with maximum likelihood estimates
- info: 1 if convergence has been successful; 0 otherwise

## Remarks

Set options with **nmsurv_options** Similar to **scsurv2**, but slower and a larger bassin of attraction. See **scsurv2** for the definition of the user-defined function, and **scsurv** and **nmsurv** for one unidvariate data. It is usually a good idea to run **scsurv2** on the result of nmsurv2.