scsurv3

Contents

Syntax

[q, info] = scsurv3(func, p, t, x, y, N)

Description

Finds maximum likelihood estimates from survivor data like scsurv and scsurv2 using the method of scores, but for two additional independent variables, rather than time only. So this routine fits a volume, not a curve.

Input

   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(:,1) initial guesses for parameter values
   p(:,2) binaries with yes or no iteration (optional)

Output

Remarks

Calls scdsurv3, and user-defined function 'func'. Set options with scsurv_options The iteration is terminated if the norm, i.e. the sum of squared derivetives of the deviance with respect to the iterated parameters, is less than the maximum norm or if the number of iterations exceeds a maximum values (see scsurv_options). If progression seems hopeful, but the number of iterations not large enough, you can continue with pars = scsurv3('function_name', pars, tvalues, xvalues, yvalues, numbers). Alternatively you can increase the maximum number of iterations with scsurv_options.

Example of use

See mydata_surv3.