Calculates covariance matrix and standard deviations for trivariate data.
[cov, cor, sd, dev] = psurv3(func, p, t, x, y, N)
Calculates covariance matrix and standard deviations of parameters in survivor models for trivariate data.
- 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
- cov: (np,np) matrix with covariances
- cor: (np,np) matrix with correlation coefficients
- sd: (np,1) matrix with standard deviations
- dev: scalar with deviance
Calls scdsurv3, and user-defined function 'func', The elements in the covariance and correlation matrices equal zero for parameters that have code 0 in the second row of the parameter input matrix. The values are the maximum likelihood estimates, therefore, no corrections for bias are made.
assuming that function_name, pars, tvalues, xvalues, yvalues, numbers are defined properly: [cov, cor, sd, ss] = pregr2('function_name', pars, tvalues, xvalues, yvalues, numbers).