is an option for GeneralizedLinearModelFit that specifies the exponential family for the model.
ExponentialFamily
is an option for GeneralizedLinearModelFit that specifies the exponential family for the model.
Details
- ExponentialFamily specifies the assumed distribution for the independent
observations modeled by
. - The density function for an exponential family can be written in the form
for functions
,
,
,
, and
, random variable
, canonical parameter
, and dispersion parameter
. - Possible parametric distributions include: "Binomial", "Poisson", "Gamma", "Gaussian", "InverseGaussian".
- The observed responses
are restricted to the domains of parametric distributions as follows: -
"Binomial" 
"Gamma" 
"Gaussian" 
"InverseGaussian" 
"Poisson" 
- The setting ExponentialFamily->"QuasiLikelihood", defines a quasi-likelihood function, used for a maximum likelihood fit.
- The log quasi-likelihood function for the response
and prediction
is given by
, where
is the dispersion parameter and
is the variance function. The dispersion parameter is estimated from input data and can be controlled through the option DispersionEstimatorFunction. - The setting ExponentialFamily->{"QuasiLikelihood",opts} allows the following quasi-likelihood suboptions to be specified:
-
"ResponseDomain" Function[y,y>0] domain for responses 
"VarianceFunction" Function[μ,1] variance as function of mean - The parametric distributions can be emulated with quasi-likelihood structures by using the following "VarianceFunction" and "ResponseDomain" suboption settings:
-
"Binomial" 

"Gamma" 

"Gaussian" 

"InverseGaussian" 

"Poisson" 

- "QuasiLikelihood" variants of "Binomial" and "Poisson" families can be used to model overdispersed (
) or underdispersed (
) data, different from the theoretical dispersion (
). - Common variance functions, response domains, and uses include:
-


power models, actuarial science, meteorology, etc. 

probability models, binomial related, etc. 

counting models, Poisson related, etc.
Examples
open all close allBasic Examples (1)
data = {{0, 1}, {1, 1.5}, {3, 2}, {5, 4}};Fit data to a simple linear regression model:
GeneralizedLinearModelFit[data, x, x]//NormalFit to a canonical gamma regression model:
GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "Gamma"]//NormalFit to a canonical inverse Gaussian regression model:
GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "InverseGaussian"]//NormalScope (2)
Use the "Binomial" family for logit models of probabilities:
data = {{1, .2}, {2.5, .6}, {4.2, .7}, {5, .65}, {10, .8}};GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "Binomial"]//NormalUse "Poisson" for log‐linear models of count data:
data = {{1, 1, 20}, {1, 2, 15}, {2, 1, 10}, {2, 2, 30}, {3, 1, 8}, {3, 2, 21}};GeneralizedLinearModelFit[data, {x, y}, {x, y}, ExponentialFamily -> "Poisson"]//NormalProperties & Relations (3)
The default ExponentialFamily and LinkFunction match LinearModelFit:
GeneralizedLinearModelFit[Range[5], x ^ 2, x]//NormalLinearModelFit[Range[5], x ^ 2, x]//NormalThe default "Binomial" model matches LogitModelFit:
GeneralizedLinearModelFit[{.2, .4, .5, .8, .9, .95}, x ^ 2, x, ExponentialFamily -> "Binomial"]//NormalLogitModelFit[{.2, .4, .5, .8, .9, .95}, x ^ 2, x]//NormalFit a "Gamma" model and the "QuasiLikelihood" analog:
gm = GeneralizedLinearModelFit[Range[10], x ^ 2, x, ExponentialFamily -> "Gamma"]qgm = GeneralizedLinearModelFit[Range[10], x ^ 2, x, ExponentialFamily -> {"QuasiLikelihood", "VarianceFunction" -> ((# ^ 2)&)}, LinkFunction -> "ReciprocalLink"]The models differ from named analogs by a constant in the "LogLikelihood":
{gm["LogLikelihood"], qgm["LogLikelihood"]}{gm[x], qgm[x]}Results based on differences of log-likelihoods agree:
{gm["DevianceTable"], qgm["DevianceTable"]}History
Text
Wolfram Research (2008), ExponentialFamily, Wolfram Language function, https://reference.wolfram.com/language/ref/ExponentialFamily.html.
CMS
Wolfram Language. 2008. "ExponentialFamily." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ExponentialFamily.html.
APA
Wolfram Language. (2008). ExponentialFamily. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExponentialFamily.html
BibTeX
@misc{reference.wolfram_2026_exponentialfamily, author="Wolfram Research", title="{ExponentialFamily}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ExponentialFamily.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_exponentialfamily, organization={Wolfram Research}, title={ExponentialFamily}, year={2008}, url={https://reference.wolfram.com/language/ref/ExponentialFamily.html}, note=[Accessed: 13-June-2026]}