Learn R Programming

cold (version 2.0-3)

anova-methods: Methods for function anova

Description

Computes an analysis deviance table for two nested fitted model objects of class cold.

Usage

# S4 method for cold
anova(object, ...)

Arguments

object

an object of class cold.

...

an object of class cold.

Warning

The comparison between two models by anova will only be valid if they are fitted to the same dataset.

Methods

signature(object = "ANY"):

Generic function.

signature(object="cold"):

Anova for cold object.

References

Pinheiro, J.C. and Bates, D.M. (2000). Mixed-Effects Models in S and S-PLUS. Springer-Verlag.

Examples

Run this code
# NOT RUN {
#####  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", dependence = "ind")

mod0R <- cold(z  ~ Time * Treatment, random = ~ 1, data = datacold, 
time = "Time", id = "Subject", dependence = "indR")
summary(mod0R)

anova(mod0, mod0R)
# }

Run the code above in your browser using DataLab