anova-methods {cold} | R Documentation |
anova
Computes an analysis deviance table for two nested fitted model objects of class cold
.
## S4 method for signature 'cold' anova(object, ...)
object |
an object of class |
... |
an object of class |
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="cold")
:Anova for cold
object.
It uses the naive solution of Pinheiro et al. (2000) to calculate the p-value when the difference between the models is the number of random effects.
Pinheiro, J.C. and Bates, D.M. (2000). Mixed-Effects Models in S and S-PLUS. Springer-Verlag.
##### data= seizure seiz1<-cold(y~lage+lbase+v4+trt+trt:lbase, data=seizure, start=NULL, dependence="AR1") seiz2<-cold(y~lage+lbase+v4+trt, data=seizure, start=NULL, dependence="AR1") anova(seiz1,seiz2) ##### data= datacold mod0<- cold(z~Time*Treatment, data=datacold, time="Time", id="Subject", aggregate=Treatment, dependence="ind") mod0R<- cold(z~Time*Treatment, random=~1,data=datacold, time="Time", id="Subject", aggregate=Treatment, dependence="indR") summary(mod0R) anova(mod0, mod0R)