anova-methods | R Documentation |
Compute an analysis deviance table for two fitted model objects.
## S4 method for signature 'bild'
anova(object, ..., test = TRUE, correct = FALSE)
object |
an object of class |
... |
an object of class |
test |
an optional logical value controlling whether likelihood ratio tests
should be used to compare the fitted models represented by |
correct |
an optional logical value controlling whether the p-value of the likelihood ratio test must be corrected. The default is FALSE. |
correct
= TRUE is used to test the presence of a random intercept term and the solution proposed by Self and Liang (1987) is adopted
only to the p-value.
The comparison between two models by anova will only be valid if they are fitted to the same dataset.
signature(object = "ANY")
:Generic function.
signature(object="bild")
:Anova for bild
object.
Self, Steven G. and Liang, Kung-Yee (1987). Asymptotic properties of maximum likelihood estimators and likelihood ratio tests under nonstandard conditions. Journal of the American Statistical Association, 82, 605-610.
##### data = locust
loc1 <- bild(move~(time+I(time^2))*feed*sex, data=locust, dependence="MC1")
loc2 <- bild(move~(time+I(time^2))*feed, data=locust, dependence="MC1")
anova(loc1,loc2)
loc3 <- bild(move~(time+I(time^2))*feed, data=locust, dependence="MC2")
anova(loc3,loc2)
##### data= muscatine
# we decompose the time effect in orthogonal components
muscatine$time1 <- c(-1, 0, 1)
muscatine$time2 <- c(1, -2, 1)
musc1 <- bild(obese~time1, data=muscatine, time="time1",
dependence="MC1")
musc1r <- bild(obese~time1, data=muscatine, time="time1",
dependence="MC1R")
anova(musc1, musc1r, correct=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.