[R] repeated measures and covariance structures
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Sep 14 18:30:01 CEST 2004
On Tue, 14 Sep 2004, Chris Solomon wrote:
> Hello-
>
> I'm trying to do some repeated measures ANOVAs. In the past, using SAS,
> I have used the framework outlined in Littell et al.'s "SAS System for
> Mixed Models", using the REPEATED statement in PROC MIXED to model
> variation across time within an experimental unit. SAS allows you to
> specify different within-unit covariance structures (e.g., compound
> symmetric, AR(1), etc.) to determine the best model.
>
> I'm having trouble figuring out how to do a similar analysis in R. While
> 'lme' will let you choose the class of correlation structure to use, it
> seems to require that you specify this structure rather than using the
> data to estimate the covariance matrix. For example, it seems that to
> specify 'corAR1' as the correlation structure, you have to pick a value
> for rho, the autoregressive parameter.
Why does `it seems'? Your information is incorrect.
> So, my question: is there a way to tell 'lme' what sort of covariance
> structure you'd like to model, and then let the function estimate the
> covariances?
That is the default. Take a look at the examples in Venables & Ripley or
Pinheiro & Bates (as recommended in the posting guide and the FAQ).
> Or, alternatively, is there a better way to go about this
> sort of repeated measures analysis in R? I've exhausted my available R
> resources and done a pretty good search of the help archives without
> finding a clear answer.
Did you look at the references in the FAQ?
> Chris Solomon
> Center for Limnology
> Univ. of Wisconsin
You do know where the maintainer of the nlme package works, don't you?
I am sure your University library has a copy or two of Pinheiro & Bates!
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list