this is a clearer (I hope) version of an earlier post - My problem is formulating the random = argument to give estimates of all 9 random components for this kind of setup where there are (I think) 9 variance/covariance components ...
Study.1 Study.2 ... Study.5 Treatment T1: subject: 1 2 3 4 5 6 ... 13 14 15 Treatment T2: subject: 16 17 18 19 20 21 ... 28 29 30 A variable is measured at the same 2 fixed sites (a and b) on each subject { Toy example data at end of email } so fixed effects are :- between-Treatments ( T1 and T2 ) between-sites ( a and b ) Treatment*site interaction and random effects are :- study effects at site a study effects at site b correlation between site a and site b study effects study*treatment interaction effects at site a study*treatment interaction effects at site b correlation between site a and b study*treatment interaction effects residual (between-subject) effects at site a residual (between-subject) effects at site b correlation between site a and b residuals (between-subject) effects I'm having trouble seeing how to formulate this correctly in lme() Hope someone can help ... cheers Bob Kinley > Toy Study Treatment Subject Site Result 1 T1 1 a 13.901820 1 T1 1 b 19.158889 1 T1 2 a 16.026299 1 T1 2 b 15.545153 1 T1 3 a 19.667706 1 T1 3 b 21.945156 1 T2 16 a 9.822498 1 T2 16 b 13.271435 1 T2 17 a 18.602909 1 T2 17 b 15.679736 1 T2 18 a 15.083195 1 T2 18 b 18.012834 2 T1 4 a 19.394835 2 T1 4 b 13.537977 2 T1 5 a 17.921014 2 T1 5 b 12.070566 2 T1 6 a 14.419953 2 T1 6 b 16.990585 2 T2 19 a 15.489600 2 T2 19 b 21.721682 2 T2 20 a 18.553789 2 T2 20 b 16.628156 2 T2 21 a 20.310238 2 T2 21 b 18.604716 3 T1 7 a 12.458706 3 T1 7 b 17.279394 3 T1 8 a 14.598512 3 T1 8 b 17.024093 3 T1 9 a 20.821720 3 T1 9 b 22.051680 3 T2 22 a 17.923521 3 T2 22 b 11.690319 3 T2 23 a 12.547144 3 T2 23 b 15.051402 3 T2 24 a 12.865087 3 T2 24 b 13.451004 4 T1 10 a 13.819201 4 T1 10 b 18.375914 4 T1 11 a 18.540972 4 T1 11 b 15.741144 4 T1 12 a 16.992064 4 T1 12 b 16.964870 4 T2 25 a 18.583896 4 T2 25 b 19.920100 4 T2 26 a 18.782343 4 T2 26 b 15.095778 4 T2 27 a 23.042282 4 T2 27 b 19.296852 5 T1 13 a 12.425960 5 T1 13 b 12.865022 5 T1 14 a 16.774604 5 T1 14 b 15.540754 5 T1 15 a 15.726991 5 T1 15 b 8.089564 5 T2 28 a 11.694392 5 T2 28 b 24.740416 5 T2 29 a 14.664904 5 T2 29 b 16.348194 5 T2 30 a 20.911168 5 T2 30 b 15.394160 > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org 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.