[cov, cor, sd, ss] = pregr (func, p, varargin)
calculates covariance and correlation matrix of parameters standard deviation and sum of squared deviations of model predictions with respect to observations
- func: character string with name of user-defined function; see nrregr
- p: (np,2) matrix with
p(:,1) parameter values p(:,2) binaries with yes or no conditional values all conditional parameters have zero (co)variance
- xywi: (ni,3) matrix with
xywi(:,1) independent variable xywi(:,2) dependent variable xywi(:,3) weight coefficients (optional) The number of data matrices xyw1, xyw2, ... is optional
- cov: (np,np) matrix with covariances
- cor: (np,np) matrix with correlation coefficients
- sd: (np,1) matrix with standard deviations
- ss: scalar with weighted sum of squared deviations
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 in the case of a identically normally distributed scatter distribution. Therefore, no corrections for bias are made.
Assuming that function_name, pars, and xyw1 (and possibly more data matrices) are defined properly: [cov cor sd ss] = pregr('function_name', pars, xyw1, xyw2, ...).