R: GLM ANOVA Statistics (original) (raw)
stat.anova {stats} | R Documentation |
---|
Description
This is a utility function, used in lm
andglm
methods for [anova](../../stats/help/anova.html)(..., test != NULL)
and should not be used by the average user.
Usage
stat.anova(table, test = c("Rao","LRT", "Chisq", "F", "Cp"),
scale, df.scale, n)
Arguments
table | numeric matrix as results fromanova.glm(..., test = NULL). |
---|---|
test | a character string, partially matching one of "Rao","LRT", "Chisq", "F" or "Cp". |
scale | a residual mean square or other scale estimate to be used as the denominator in an F test. |
df.scale | degrees of freedom corresponding to scale. |
n | number of observations. |
Value
A matrix which is the original table
, augmented by a column of test statistics, depending on the test
argument.
References
Hastie TJ, Pregibon D (1992). “Generalized Linear Models.” In Chambers JM, Hastie TJ (eds.), Statistical Models in S, chapter 6. Wadsworth & Brooks/Cole.
See Also
[anova.lm](../../stats/help/anova.lm.html)
, [anova.glm](../../stats/help/anova.glm.html)
.
Examples
##-- Continued from '?glm':
print(ag <- anova(glm.D93))
stat.anova(ag$table, test = "Cp",
scale = sum(resid(glm.D93, "pearson")^2)/4,
df.scale = 4, n = 9)
[Package _stats_ version 4.6.0 Index]