stat.anova
Add Statistics Columns to an Anova Table

Description

Creates a new anova table with appropriate statistics columns.

Usage

stat.anova(table, test = c("Chisq", "F", "Cp"), scale, df.scale, n, familyName = "gaussian") 

Arguments

table an anova object
test what test to use; the choices are "Chisq", "F", or "Cp"
scale an estimate of scale, needed for all test.
df.scale the (residual) degrees of freedom associated with the scale estimate (as in the denominator of an F-ratio).'
n the sample size for the data underlying the anova table.
familyName The name of the glm family being used by the object(s) in the anova. If it is "binomial" or "poisson" and an F-test is requested then stat.anova will warn that the test is inappropriate (since there is not an independent estimate of dispersion) and the p-value will be computed using df2=Inf.
Value
a new anova table is returned, with the appropriate statisticscolumns included. This function relies on the names of the columns being in a small subset of allowed names. It is mainly intended as a support function for anova(), step(), add1() or drop1().
References
Hastie, T. J. and Pregibon, D. 1992. Generalized linear models. Statistical Models in S. Chambers, J. M. and Hastie, T. J. (Eds.) Pacific Grove, CA.: Wadsworth & Brooks/Cole. Chapter 6.
See Also
anova, step, add1, drop1
Examples
numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
sex <- factor(rep(c("M", "F"), c(6, 6)))
ldose <- rep(0:5, 2)
SF <- cbind(numdead, numalive = 20 - numdead)
budworm.lg.anv <- anova(glm(SF ~ sex*ldose, family = binomial))
stat.anova(budworm.lg.anv, test = "F", scale = 0.8, df.scale = 1.2, n = 12)
stat.anova(budworm.lg.anv, test = "Cp", scale = 0.8, df.scale = 1.2, n = 12)
stat.anova(budworm.lg.anv, test = "Chisq", scale = 0.8, df.scale = 1.2, n = 12)  
stat.anova(budworm.lg.anv, test = "Chisq", scale = 1.0, df.scale = 1.2, n = 12)  
Package stats version 6.0.0-69
Package Index