[R] repeated measures regression

Bert Gunter gunter.berton at gene.com
Thu May 17 20:20:47 CEST 2007


You need to gain some background. MIXED EFFECTS MODELS in S and S-PLUS by
Pinheiro and Bates is a canonical reference for how to do this with R.
Chapter 10  of Venables and Ripley's MASS(4th ed.) contains a more compact
but very informative overview that may suffice. Other useful references can
also be found on CRAN.


Bert Gunter
Genentech Nonclinical Statistics

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of John Christie
Sent: Thursday, May 17, 2007 10:06 AM
To: R-help at stat.math.ethz.ch
Subject: [R] repeated measures regression


How does one go about doing a repeated measure regression? The  
documentation I have on it (Lorch & Myers 1990) says to use linear /  
(subj x linear) to get your F.  However, if I put subject into glm or  
lm I can't get back a straight error term because it assumes  
(rightly) that subject is a nominal predictor of some sort.

In looking at LME it seems like it just does the right thing here if  
I enter the random effect the same as when looking for ANOVA like  
results out of it.  But, part of the reason I'm asking is that I  
wanted to compare the two methods.  I suppose I could get it out of  
aov but isn't that built on lm?  I guess what I'm asking is how to  
calculate the error terms easily with lm.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list