Hi everyone, I want to fit the following mixed effect model Y_ij = b_0i + b_1i * (t_ij*grp_ij == 1) + b_2i * (t_ij*grp_ij == 2) + v_0i + v_1i*t_ij + e_ij with a different covariance matrix of random effects for each group. (Y is the response t is time grp is the group indicator b 's are fixed effects v 's are random effects) I know that this is possible in SAS (I am no expert in SAS, I just looked up some notes) as * Fit a model with a same diagonal Ri matrix for; * each group. * D = (2x2) unstructured matrix differs across groups; * Specified in the RANDOM statement by the GROUP=grp option; title 'RANDOM COEFFICIENT MODEL WITH DIAGONAL WITHIN-PATIENT'; title1 'DIFFERENT D MATRIX FOR BOTH GENDERS'; proc mixed method=ml data=dent1; class pt grp; model y = grp grp*t / noint solution; random intercept t / type=un group=grp subject=pt g gcorr v vcorr; run; The key to specifying different covariance structure for the random effects seems to be the highlighted portion in the code. What would be it's equivalent in R? In R, I tried the following Model1 <- lme(y ~ g1+Tg1+g2+Tg2-1,random pdBlocked(list(pdSymm(~g1+Tg1-1),pdSymm(~g2+Tg2-1))),data=X.gr,control=c on) where, g1 and g2 are the group indicator variables and Tg1 = t*(grp==1), similarly Tg2 is defined. I am forced to assume different intercept for each group in this approach but anyway this works and gives me some output. Now, I have 5 groups (and there 7 measurements on each subject). I specify the corresponding formula for all 5 groups, it returns a message : Warning message: Fewer observations than random effects in all level 1 groups This creates a doubt in me that possibly this is not the correct way to specify the model I am interested in. I would appreciate if someone can help me sort out things. Thanks. ~ Rohit [[alternative HTML version deleted]]