nmsurv

Calculates max likelihood estimates using Nelder Mead's simplex method

Contents

Syntax

[q, info] = nmsurv(func, p, varargin)

Description

Calculates max likelihood estimates using Nelder Mead's simplex method similar to nrsurv, but slower and a larger bassin of attraction

Input

   f = func (p, tn) with
     p: k-vector with parameters; tn: (n,c)-matrix; f: n-vector
   [f1, f2, ...] = func (p, tn1, tn2, ...) with  p: k-vector  and
    tni: (ni,k)-matrix; fi: ni-vector with model predictions
   The dependent variable in the output f; For tn see below.
   p(:,1) initial guesses for parameter values
   p(:,2) binaries with yes or no iteration (optional)
   tni(:,1) time: must be increasing with rows
   tni(:,2) number of survivors: must be non-increasing with rows
   tni(:,3, 4, ... ) data-pont specific information data (optional)
   The number of data matrices tn1, tn2, ... is optional but >0

Output

Remarks

Calls user-defined function 'func' Set options with html nmregr_options See scsurv for the definition of the user-defined function, and scsurv2 and nmsurv2 for 2 independent variables and scsurv3 and nmsurv3 for 3 independent variables. It is usually a good idea to run scsurv on the result of nmsurv.

Example of use

See mydata_surv

obtain time intervals and numbers of death

set options if necessary