[q, info] = scsurv3(func, p, t, x, y, N)
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.
- 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
- N: (nt,nx*ny)-matrix with surviving numbers
- q: matrix like p, but with maximum likelihood estimates
- info: 1 if convergence has been successful; 0 otherwise
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.