is an option for generalized linear model fitting functions that specifies the estimator for the dispersion parameter.
DispersionEstimatorFunction
is an option for generalized linear model fitting functions that specifies the estimator for the dispersion parameter.
Details
- DispersionEstimatorFunction is an option for GeneralizedLinearModelFit, LogitModelFit, and ProbitModelFit.
- With DispersionEstimatorFunction->"PearsonChiSquare", the estimator is
where
is the number of data points,
is the number of parameters, and
is the variance function for the distribution. - With DispersionEstimatorFunction->Automatic, the following estimates are used:
-
"Binomial" 1 "Gamma" 
"Gaussian" 
"InverseGaussian" 
"Poisson" 1 "QuasiLikelihood" 
- Non‐default values can be used to model overdispersion in "Binomial" and "Poisson" models.
- With the setting DispersionEstimatorFunction->f, the common dispersion is estimated by f[y,
,w] where y={y1,y2,…} is the list of observations,
={
,
,…} is the list of predicted values, and w={w1,w2,…} is the list of weights for the measurements yi.
Examples
open all close allBasic Examples (2)
Fit a Poisson model using Pearson's
to estimate the dispersion:
m = GeneralizedLinearModelFit[{...}, x, x, ExponentialFamily -> "Poisson", DispersionEstimatorFunction -> "PearsonChiSquare"]Compute the parameter covariance matrix using the default dispersion estimate:
m["CovarianceMatrix"]//MatrixFormSet the dispersion estimator when querying the covariance after fitting:
m = GeneralizedLinearModelFit[{...}, x, x, ExponentialFamily -> "Poisson"]Estimate the dispersion by the mean squared error:
m["CovarianceMatrix", DispersionEstimatorFunction -> (Mean[(#1 - #2) ^ 2]&)]//MatrixFormScope (2)
Define the estimate within the FittedModel:
data = {{1, 1}, {2, 1}, {3, 4}, {5, 6}};m = GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "Poisson"]m["CovarianceMatrix"]m["CovarianceMatrix", DispersionEstimatorFunction -> (2&)]m["CovarianceMatrix", DispersionEstimatorFunction -> "PearsonChiSquare"]m["CovarianceMatrix", DispersionEstimatorFunction -> (Mean[(#1 - #2) ^ 2]&)]data = {{1, 0}, {1, 1}, {1, 1}, {2, 0}, {2, 0}, {2, 1}, {2, 1}, {2, 1}, {2, 1}};logit = LogitModelFit[data, x, x]Estimate the dispersion by the sum of squared errors:
logit["EstimatedDispersion", DispersionEstimatorFunction -> (Total[(#1 - #2) ^ 2]&)]probit = ProbitModelFit[data, x, x]Estimate the dispersion by the mean squared error:
probit["EstimatedDispersion", DispersionEstimatorFunction -> (Mean[(#1 - #2) ^ 2]&)]Related Guides
History
Text
Wolfram Research (2008), DispersionEstimatorFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DispersionEstimatorFunction.html.
CMS
Wolfram Language. 2008. "DispersionEstimatorFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DispersionEstimatorFunction.html.
APA
Wolfram Language. (2008). DispersionEstimatorFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DispersionEstimatorFunction.html
BibTeX
@misc{reference.wolfram_2026_dispersionestimatorfunction, author="Wolfram Research", title="{DispersionEstimatorFunction}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/DispersionEstimatorFunction.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_dispersionestimatorfunction, organization={Wolfram Research}, title={DispersionEstimatorFunction}, year={2008}, url={https://reference.wolfram.com/language/ref/DispersionEstimatorFunction.html}, note=[Accessed: 13-June-2026]}