nrsurv
Calculates maximum likelihood estimates using Newton Raphson method
Contents
Sybtax
[q, info] = nrsurv (func, p, varargin)
Description
Calculates maximum likelihood estimates using Newton Raphson method
Input
- func: string with name of user-defined function
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: (k,2) matrix with
p(:,1) initial guesses for parameter values p(:,2) binaries with yes or no iteration (optional)
- tni (read as tn1, tn2, .. ): (ni,2) matrix with
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
- q: matrix like p, but with ml-estimates
- info: 1 if convergence has been successful; 0 otherwise
Remarks
Calls nrdsurv, and user-defined function 'func' Set options with nrregr_options
Example of use
See mydata_surv