Hi Mark, > (2) Is there a way to tell lme (either in nlme or lme4) to just use a > specified design matrix Z for the random effects, rather than > constructing one itself from factors? Sometimes I would really like to > use my own funny-looking Z matrix (e.g. with non-integer coefficients), > and even with contrasts() I haven't managed to do this.
Here's a simple example showing a `standard' call to lme, and a less standard one doing the same thing with a specified Z.... library(nlme) data(Rail) lme(travel~1,Rail,~1|Rail) # simple r.e. model example ## now repeat fit with home-made Z... Rail$all<-factor(rep(1,18)) # all one group ## create a simple Z ... Rail$Z<-model.matrix(~factor(Rail$Rail,ordered=FALSE)-1) ## use pdIdent to force r.e.s to be independent ... lme(travel~1,Rail,list(all=pdIdent(~Z))) best, Simon ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
