({{, (RefLink[CovarianceEstimatorFunction, paclet:ref/CovarianceEstimatorFunction]) 
is an option for generalized linear model fitting functions that specifies the estimator for the parameter covariance matrix.}})

OpenersNotesSection(Spacer1)Details

(RefLink[CovarianceEstimatorFunction, paclet:ref/CovarianceEstimatorFunction]) is an option for (RefLink[GeneralizedLinearModelFit, paclet:ref/GeneralizedLinearModelFit]), (RefLink[LogitModelFit, paclet:ref/LogitModelFit]), and (RefLink[ProbitModelFit, paclet:ref/ProbitModelFit]).

Possible settings include "ExpectedInformation" and "ObservedInformation" which use the expected information matrix and observed information matrix, respectively.

The covariance matrix is equivalent to -ϕ (I^(-1)), where ϕ is the dispersion parameter and I is Fisher's information matrix.

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Fit a generalized linear model:

data={{0,1},{1,1.5},{3,2},{5,10}};

glm=GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma"]

Compute the covariance matrix using the expected information matrix:

glm["CovarianceMatrix"]

Use the observed information matrix instead:

glm=GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma",CovarianceEstimatorFunction->"ObservedInformation"]

glm["CovarianceMatrix"]

OpenersExampleSection1(Spacer1)Scope  (2)

Specify the covariance estimate within the (RefLink[FittedModel, paclet:ref/FittedModel]):

data={{0,1},{1,1.5},{3,2},{5,10}};

glm=GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma"]

glm["CovarianceMatrix",CovarianceEstimatorFunction->"ObservedInformation"]

Use with (RefLink[LogitModelFit, paclet:ref/LogitModelFit]):

data={.15,.27,.58,.49,.77}

logit=LogitModelFit[data,x,x]

logit["ParameterErrors"]

logit["ParameterErrors",CovarianceEstimatorFunction->"ObservedInformation"]

Use with (RefLink[ProbitModelFit, paclet:ref/ProbitModelFit]):

probit=ProbitModelFit[data,x,x]

probit["ParameterErrors"]

probit["ParameterErrors",CovarianceEstimatorFunction->"ObservedInformation"]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

Error estimates and confidence intervals involve covariance estimates:

data={{0,1},{1,1.5},{3,2},{5,10}};

glm=GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma"]

Estimate errors and intervals using expected information:

glm[{"ParameterErrors","ParameterConfidenceIntervals"}]

Use observed information:

glm[{"ParameterErrors","ParameterConfidenceIntervals"},CovarianceEstimatorFunction->"ObservedInformation"]

(RefLink[CovarianceEstimatorFunction, paclet:ref/CovarianceEstimatorFunction]) controls the general structure of the covariance:

glm=GeneralizedLinearModelFit[{{0,1},{1,1.5},{3,2},{5,10}},x,x,ExponentialFamily->"Gamma"]

{err,disp}=glm[{"ParameterErrors","EstimatedDispersion"},CovarianceEstimatorFunction->"ObservedInformation"]

(RefLink[DispersionEstimatorFunction, paclet:ref/DispersionEstimatorFunction]) affects the scale:

{err2,disp2}=glm[{"ParameterErrors","EstimatedDispersion"},CovarianceEstimatorFunction->"ObservedInformation",DispersionEstimatorFunction->(1&)]

The ratio of the errors squared is the ratio of the dispersion estimates:

(err/err2)^2

disp/disp2

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeneralizedLinearModelFit, paclet:ref/GeneralizedLinearModelFit])  ▪  (RefLink[LogitModelFit, paclet:ref/LogitModelFit])  ▪  (RefLink[ProbitModelFit, paclet:ref/ProbitModelFit])  ▪  (RefLink[DispersionEstimatorFunction, paclet:ref/DispersionEstimatorFunction])}})}})