我希望拟合一个协方差模式模型,其中结果在聚类内以及在嵌套在聚类中的主体的重复测量中相关。
在SAS中我会适合以下模型:
PROC MIXED DATA = test ;
CLASS cluster_id subject_id time ;
MODEL outcome = time / DDFM = KenwardRoger;
RANDOM intercept / subject = cluster_id V VCorr ;
REPEATED / SUBJECT = subject_id(cluster_id) TYPE = AR(1) R RCorr ;
RUN;
如何使用R适合此模型?我查看了nlme软件包文档,但还没弄明白。