Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica >

ExponentialFamily

ExponentialFamily
is an option for GeneralizedLinearModelFit which specifies the exponential family for the model.
  • ExponentialFamily specifies the assumed distribution for the independent yi observations modeled by .
  • The density function for an exponential family can be written in the form for functions a, b, c, d and h, random variable y, canonical parameter Theta and dispersion parameter Phi.
  • Possible parametric distributions include: "Binomial", "Poisson", "Gamma", "Gaussian", "InverseGaussian".
  • The observed responses yi are restricted to the domains of parametric distributions as follows:
"Binomial"0<=y<=1
"Gamma"y>0
"Gaussian"y in R
"InverseGaussian"y>0
"Poisson"y>=0, y in Z
  • The setting ExponentialFamily->"QuasiLikelihood", defines a quasi-likelihood function, used for a maximum likelihood fit.
  • The log quasi-likelihood function for the response yi and prediction is given by , where Phi is the dispersion parameter and v(mu) 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 yi
"VarianceFunction"Function[Mu,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"mu (1-mu)0<=y<=1
"Gamma"mu^2y>0
"Gaussian"1y in R
"InverseGaussian"mu^3y>0
"Poisson"muy>0, y in Z
  • "QuasiLikelihood" variants of "Binomial" and "Poisson" families can be used to model overdispersed (phi>1) or underdispersed (phi<1) data, different from the theoretical dispersion (phi=1).
  • Common variance functions, response domains and uses include:
mu^ky>0power models, actuarial science, meteorology, etc.
mu^k (1-mu)^k0<y<1probability models, binomial related, etc.
alpha mu^2+muy>=0counting models, poisson related, etc.
Fit data to a simple linear regression model:
Fit to a canonical gamma regression model:
Fit to a canonical inverse Gaussian regression model:
In[1]:=
Click for copyable input
Fit data to a simple linear regression model:
In[2]:=
Click for copyable input
Out[2]=
Fit to a canonical gamma regression model:
In[3]:=
Click for copyable input
Out[3]=
Fit to a canonical inverse Gaussian regression model:
In[4]:=
Click for copyable input
Out[4]=
Use the "Binomial" family for logit models of probabilities:
Use "Poisson" for log-linear models of count data:
The default "Binomial" model matches LogitModelFit:
Fit a "Gamma" model and the "QuasiLikelihood" analog:
The models differ from named analogs by a constant in the "LogLikelihood":
Fitted parameters agree:
Results based on differences of log-likelihoods agree:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team