[R-sig-ME] Residuals of mixed effects model

will.eagle at gmx.net will.eagle at gmx.net
Mon Aug 2 11:55:46 CEST 2010


Dear all,

I would like to apply a statistical test which is only available for indepedent samples to a data set with dependent samples based on a repeated measures design with 3 time points.

To adjust for correlatedness my idea was to convert the data into long format and use a linear mixed effects model with individuals as a random effect and an unstructured covariance matrix, to calculate the residuals. 

lme.out <- lme(data=MyDataInLongFormat,fixed= outcome~1, 
random= ~ 1|individual, correlation=corSymm(form = ~time|individual))

My expectaction was that residuals(lme.out, type = "normalized") should give me residuals which show only minor correlations (|r|<0.05) across time points (assuming the covariance structure fits the data), which should be suitable as an input for a test for independent samples.

Unfortunately, the original variable and residuals behave like that, which is the opposite of what I expected e.g.:
Original values: r(t1,t2) = 0.33
Residual values: r(t1,t2) = 0.73

Is my approach correct? Am using the right functions and options?

Thanks for your help in advance,

Will

PS: Sorry for cross-posting this question again after I misplaced it to the R-help mailing list: http://r.789695.n4.nabble.com/Residuals-of-mixed-effects-model-td2306516.html




More information about the R-sig-mixed-models mailing list