Dear all, I have a question about mixed effect model in R. The data set has 5 variables, X(response),subject, times, repeat, indicator The model is X_hijk=a_h+Z_h*b_i+r(ij)+e_hijk , where h=0,1(indicator), i=1,...,n(subject), j=1,...,n_i(times within subject; nested effect),k=1,2,3(repeat). Z_h=1 if h=1 =0 if h=0 b_i~N(0,c^2) random effect of subject r(ij)~N(0,d^2) random effect of times within subject e_hijk~N(0,e^2) error term which is independent with the random effects. The purpose is to estimate the parameters a_h, c^2,d^2,e^2. My question is how to fit the model in R; more specifically, how to specify the formula of random effect in command "lme" in R. Thanks very much for your help. --------------------------------- [[alternative HTML version deleted]]