sj414 <sj414 <at> medschl.cam.ac.uk> writes: > R has no problem with a command of the type > model<-lme(Y~f(x),random=~x|z) > but returns that error message when the command becomes something like > model<-lme(Y~f(X),random=~x|z,correlation=corCompSymm) > Y is a vector of single observations from 2099 individuals, X is the > covariate matrix of which x is one column, z is the family numbers; 1-1801. > It seems to be the addition of dependence which causes the problem.
Yes, because correlation=corCompSymm is not how you're supposed to specify the correlations: rather, it should look something like model <- lme(Y~a+b*X,random=~x|z,correlation=corCompSymm(form=~1|z)) although I think you might be able to get away with model <- lme(Y~a+b*X,random=~x|z,correlation=corCompSymm()) Two more thoughts: * as I said before, this might be better suited to the r-sig-mixed-models list * finding a copy of Pinheiro and Bates 2000 would definitely be a good idea if you're going to deal with correlation structures in lme much more ... Ben Bolker ______________________________________________ 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.