10
$\begingroup$

I have ran a glm in R, and near the bottom of the summary() output, it states

(Dispersion parameter for gaussian family taken to be 28.35031)

I've done some rummaging on Google and learnt that the dispersion parameter is used to fit the standard errors. I'm hoping somebody could provide more details on what the dispersion parameter is and how it should be interpreted?

$\endgroup$
9
$\begingroup$

One way to explore this is to try fitting the same model using different tools, here is one example:

> fit1 <- lm( Sepal.Length ~ ., data=iris )
> fit2 <- glm( Sepal.Length ~ ., data=iris )
> summary(fit1)

Call:
lm(formula = Sepal.Length ~ ., data = iris)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.79424 -0.21874  0.00899  0.20255  0.73103 

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)        2.17127    0.27979   7.760 1.43e-12 ***
Sepal.Width        0.49589    0.08607   5.761 4.87e-08 ***
Petal.Length       0.82924    0.06853  12.101  < 2e-16 ***
Petal.Width       -0.31516    0.15120  -2.084  0.03889 *  
Speciesversicolor -0.72356    0.24017  -3.013  0.00306 ** 
Speciesvirginica  -1.02350    0.33373  -3.067  0.00258 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 0.3068 on 144 degrees of freedom
Multiple R-squared: 0.8673,     Adjusted R-squared: 0.8627 
F-statistic: 188.3 on 5 and 144 DF,  p-value: < 2.2e-16 

> summary(fit2)

Call:
glm(formula = Sepal.Length ~ ., data = iris)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-0.79424  -0.21874   0.00899   0.20255   0.73103  

Coefficients:
                  Estimate Std. Error t value Pr(>|t|)    
(Intercept)        2.17127    0.27979   7.760 1.43e-12 ***
Sepal.Width        0.49589    0.08607   5.761 4.87e-08 ***
Petal.Length       0.82924    0.06853  12.101  < 2e-16 ***
Petal.Width       -0.31516    0.15120  -2.084  0.03889 *  
Speciesversicolor -0.72356    0.24017  -3.013  0.00306 ** 
Speciesvirginica  -1.02350    0.33373  -3.067  0.00258 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

(Dispersion parameter for gaussian family taken to be 0.09414226)

    Null deviance: 102.168  on 149  degrees of freedom
Residual deviance:  13.556  on 144  degrees of freedom
AIC: 79.116

Number of Fisher Scoring iterations: 2

> sqrt( 0.09414226 )
[1] 0.3068261

So you can see that the residual standard error of the linear model is just the square root of the dispersion from the glm, in other words the dispersion (for Gaussian models) is the same as the mean square error.

$\endgroup$
3
$\begingroup$

Let us speculate the simple situation where there is no covariate information in your data. Say, you just have observations $Y_1, Y_2, \ldots, Y_n \in \mathbb{R}$.

If you are using normal distribution to model your data, you would probably write that

$Y_i \sim \mathcal{N}(\mu, \sigma^2)$,

and then try to estimate $\mu$ and $\sigma$, maybe via maximum likelihood estimation.

But let's say your data is count data and thus not normally distributed. It is not even continuous this case, so you may use Poisson distribution instead:

$Y_i \sim Poisson(\lambda)$.

However, you have only one parameter here! The single parameter $\lambda$ determines both mean and variance by $\mathbb{E}[Y_i] = \lambda$ and $Var[Y_i] = \lambda$. This also happens when you use Bernoulli or binomial distribution. But you may have larger or smaller variance in your data, possibly because observations are not truly iid or the distribution you chose was not realistic enough.

So people add dispersion parameter to get additional degree of freedom in modeling mean and variance simultaneously. I guess any textbook on GLM will give you more detailed and mathematical explanation about what it is, but the motivation, I believe, is pretty simple like this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.