[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


   p(:,1) parameter values
   p(:,2) binaries with yes or no conditional values
   all conditional parameters have zero (co)variance
   xywi(:,1) independent variable
   xywi(:,2) dependent variable
   xywi(:,3) weight coefficients (optional)
   The number of data matrices xyw1, xyw2, ... is optional



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.

Example of use

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, ...).