[R] Repeated measures in R

GenTOstats mehta at mpipsykl.mpg.de
Thu May 20 13:23:15 CEST 2010


Hey all

I am relatively new to analysis in R 
(and am a geneticist so apologies for rubbish questions ),

I have a question regarding repeated measures analysis

this was what i have done so far 
1)ph<-make.rm(constant=c("sid","pheno1","snp","sex","age"),repeated=c("measure1","measure2"),data=file)

2) i want to analyze 
 aov( repdat ~ pheno1 + snp + pheno1:snp + repdat:snp + repdat:pheno1 +
repdat:pheno1:snp + age + sex )

when i use SPSS (GLM repeated measures) it automatically generates the above
model for me)

But i read that I need to add in the sample ID term together with the Error
term to get the correct sum of squares 

3) Does this mean i need 

repdat ~ pheno1 + snp + pheno1:snp + repdat:snp + repdat:pheno1 +
repdat:pheno1:snp + age + sex 
             + sid + Error(sid/repdat + pheno1 + snp)

to get the correct anova summary?

Thanks

GS



-- 
View this message in context: http://r.789695.n4.nabble.com/Repeated-measures-in-R-tp2224326p2224326.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list