REAR {agce}R Documentation

Fit a autoregressive model with random errors

Description

This function fits two different models using the nlme library and then compares them using a likelihood ratio test. The first model is an autoregressive random errors model with a linear mean assuming different slope in each group. The second model is an autoregressive random errors model with a linear mean assuming same slope in each group.

Usage

REAR(data,time)

Arguments

data The data matrix or data frame, where the first column correspond to the group id, the second to the animal id, the remaining columns are the measurement at each time.
time A vector of numeric values corresponding to the time points at which the measurements were effectued.

Details

The data are reshaped in a longitudinal dataset and then the models are fit using the lme function of the nlme library.

Value

Chi The value of the Chisquare test used to test the hypothesis of equal slopes
df The degrees of freedom for the Chisquare test
p The p-value associated to the Chisquare test
sum.fit.full The summary on the fit of the full model
std.fit.reduced The summary on the fit of the reduced model

Author(s)

Raphael Gottardo

References

Daniel F. Heitjan, Andrea Manni and Richard J. Santen Statistical Analysis of in Vivo Tumor Growth Experiments Cancer Research 53:6042-6050, 1993.

Examples

data(Bt20)
REAR(Bt20,c(0,3,7,10,14,16))

[Package agce version 1.2 Index]