Hi All,

I built a mixed model with subject-specific variance structure in SAS and it 
works quite well. Now I intended to implement the same model in R using lme 
with "weights" option. Following is the SAS code and the corresponding R code:

SAS:
proc mixed data=source;
class id trial group valence scan;
model y=group|valence|scan;
repeated /sub=id(trial) group=id type=AR(1);
run;

R

vf1Ident<-varIdent(~1|id)
vf1Ident.ini<-Initialize(vf1Ident,grouped.data)
model<-lme(fixed=y~group*valence*scan,data=grouped.data,correlation=corAR1(),weights=vf1Ident.ini);

The result shows :convergence error code = 1  message = iteration limit reached 
without convergence (9)

I searched the help archive and likely the weights option does not work well. 
Any suggestion to implement the subject-specific variance structure in R?

Thanks,

Yonghua

        [[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.

Reply via email to