nmsurv3
Calculates maximum likelihood estimates using Nelder Mead's simplex method for trivariate data
Contents
Syntax
[q, info] = nmsurv3(func, p, t, x, y, Z)
Description
Calculates maximum likelihood estimates using Nelder Mead's simplex method for trivariate data
Input
- func: string with name of user-defined function
f = func (p, t, x, y) with p: np-vector; t: nt-vector; x: nx-vector; y: ny-vector f: (nt,nx*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)
- x: (nx,1)-vector with second independent variable
- y: (ny,1)-vector with third independent variable
- Z: (nx,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 scsurv3, but slower and a larger basin of attraction. See scsurv3 for the definition of the user-defined function, and scsurv and nmsurv for univariate data. It is usually a good idea to run scsurv3 on the result of nmsurv3.