summary.dglm: Summarizing double generalized linear model fits

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/summary.dglm.R

Description

These functions are all methods for class dglm or summary.glm objects.

Usage

1
2
## S3 method for class 'dglm'
summary(object, dispersion=NULL, correlation = FALSE, ...)

Arguments

object

an object of class "dglm", usually, a result of a call to glm.

dispersion

the dispersion parameter for the fitting family. By default it is obtained from object.

correlation

logical; if TRUE, the correlation matrix of the estimated parameters is returned and printed.

...

further arguments to be passed to summary.glm

Details

For more details, see summary.glm.

If more than one of etastart, start and mustart is specified, the first in the list will be used.

Value

summary.dglm returns an object of class "summary.dglm", a list with components

call

the component from object

terms

the component from object

family

the component from object

deviance

the component from object

aic

NULL here

constrasts

(where relevant) the contrasts used. NOT WORKING??

df.residual

the component from object

null.deviance

the component from object

df.null

the residual degrees of freedom for the null model.

iter

the component from object

deviance.resid

the deviance residuals: see residuals.glm

coefficients

the matrix of coefficients, standard errors, z-values and p-values. Aliased coefficients are omitted.

aliased

named logical vector showing if the original coefficients are aliased.

dispersion

either the supplied argument or the estimated dispersion if the latter in NULL

df

a 3-vector of the rank of the model and the number of residual degrees of freedom, plus number of non-aliased coefficients.

cov.unscaled

the unscaled (dispersion = 1) estimated covariance matrix of the estimated coefficients.

cov.scaled

ditto, scaled by dispersion

correlation

(only if correlation is true.) The estimated correlations of the estimated coefficients.

dispersion.summary

the summary of the fitted dispersion model

outer.iter

the number of outer iteration of the alternating iterations

m2loglik

minus twice the log-likelihood of the fitted model

Note

The anova method is questionable when applied to an dglm object with method="reml" (stick to method="ml").

Author(s)

Gordon Smyth, ported to R\ by Peter Dunn ([email protected])

References

Smyth, G. K. (1989). Generalized linear models with varying dispersion. J. R. Statist. Soc. B, 51, 47–60.

Smyth, G. K., and Verbyla, A. P. (1999). Adjusted likelihood methods for modelling dispersion in generalized linear models. Environmetrics, 10, 696-709.

Verbyla, A. P., and Smyth, G. K. (1998). Double generalized linear models: approximate residual maximum likelihood and diagnostics. Research Report, Department of Statistics, University of Adelaide.

See Also

dglm.object, dglm.control, anova.dglm, summary.glm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Continuing the example from  glm, but this time try
# fitting a Gamma double generalized linear model also.
clotting <- data.frame(
      u = c(5,10,15,20,30,40,60,80,100),
      lot1 = c(118,58,42,35,27,25,21,19,18),
      lot2 = c(69,35,26,21,18,16,13,12,12))
         
# The same example as in  glm: the dispersion is modelled as constant
out <- dglm(lot1 ~ log(u), ~1, data=clotting, family=Gamma)
summary(out)

# Try a double glm 
out2 <- dglm(lot1 ~ log(u), ~u, data=clotting, family=Gamma)

summary(out2)
anova(out2)

# Summarize the mean model as for a glm
summary.glm(out2)
    
# Summarize the dispersion model as for a glm
summary(out2$dispersion.fit)

Example output

Loading required package: statmod

Call: dglm(formula = lot1 ~ log(u), dformula = ~1, family = Gamma, 
    data = clotting)

Mean Coefficients:
               Estimate   Std. Error   t value     Pr(>|t|)
(Intercept) -0.01655438 0.0009275491 -17.84744 4.279230e-07
log(u)       0.01534311 0.0004149596  36.97496 2.751191e-09
(Dispersion Parameters for Gamma family estimated as below )

    Scaled Null Deviance: 1890.363 on 8 degrees of freedom
Scaled Residual Deviance: 9.002787 on 7 degrees of freedom

Dispersion Coefficients:
             Estimate Std. Error   z value     Pr(>|z|)
(Intercept) -6.288103  0.4712586 -13.34321 1.297468e-40
(Dispersion parameter for Digamma family taken to be 2 )

    Scaled Null Deviance: 8.90448 on 8 degrees of freedom
Scaled Residual Deviance: 8.90448 on 8 degrees of freedom

Minus Twice the Log-Likelihood: 31.98992 
Number of Alternating Iterations: 4 

Call: dglm(formula = lot1 ~ log(u), dformula = ~u, family = Gamma, 
    data = clotting)

Mean Coefficients:
               Estimate   Std. Error   t value     Pr(>|t|)
(Intercept) -0.01784797 0.0010062108 -17.73780 4.464149e-07
log(u)       0.01596262 0.0002301215  69.36604 3.402379e-11
(Dispersion Parameters for Gamma family estimated as below )

    Scaled Null Deviance: 2313.573 on 8 degrees of freedom
Scaled Residual Deviance: 9.003391 on 7 degrees of freedom

Dispersion Coefficients:
               Estimate Std. Error   z value     Pr(>|z|)
(Intercept) -4.59256962 0.76357166 -6.014589 1.803438e-09
u           -0.06966577 0.01502817 -4.635680 3.557663e-06
(Dispersion parameter for Digamma family taken to be 2 )

    Scaled Null Deviance: 16.75853 on 8 degrees of freedom
Scaled Residual Deviance: 4.414477 on 7 degrees of freedom

Minus Twice the Log-Likelihood: 22.17126 
Number of Alternating Iterations: 5 
Analysis of Deviance Table

Gamma double generalized linear model

Response: lot1

                 DF Seq.Chisq     Seq.P Adj.Chisq     Adj.P
Mean model        1    48.686 0.0000000    47.403 0.0000000
Dispersion model  1     9.819 0.0017275     9.819 0.0017275

Call:
dglm(formula = lot1 ~ log(u), dformula = ~u, family = Gamma, 
    data = clotting)

Deviance Residuals: 
      Min         1Q     Median         3Q        Max  
-0.076478  -0.010122   0.001926   0.048233   0.093677  

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.0178480  0.0010062  -17.74 4.46e-07 ***
log(u)       0.0159626  0.0002301   69.37 3.40e-11 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for Gamma family taken to be 1.307633)

    Null deviance: 2313.5733  on 8  degrees of freedom
Residual deviance:    9.0034  on 7  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 5


Call:
dglm(formula = ~u, family = Digamma(link = "log"), data = clotting)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-2.18708  -0.81757  -0.07655   0.16104   1.16959  

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) -4.59257    0.53790  -8.538    6e-05 ***
u           -0.06967    0.01059  -6.581  0.00031 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for Digamma family taken to be 0.9925192)

    Null deviance: 16.7585  on 7  degrees of freedom
Residual deviance:  4.4145  on 7  degrees of freedom
AIC: NA

Number of Fisher Scoring iterations: 5

dglm documentation built on May 29, 2017, 10:42 p.m.

Related to summary.dglm in dglm...