[R] lme and mixed effects

Douglas Bates bates at stat.wisc.edu
Tue Jan 22 16:32:51 CET 2002


Doug Davidson <dvdsn at printhost.beckman.uiuc.edu> writes:

> With lme, is there a way to specify multiple fixed factors under one
> level of grouping?

I'm not sure I understand the question.  Can you tell us more about
the model that you want to fit?

If you mean that you want a random interaction term then you might
want to check the description in section 1.3 of Pinheiro and Bates
(Springer, 2000) on different ways that interactions can be expressed
in lme.

> For example, for a single fixed factor, I use the following:
> 
> fm1.lme <- lme(fixed=resp ~ fact1, random=~1|subj/fact1, data=mydata) 
> 
> 
> I would like to have multiple factors under subj, like the following
> for a two-way design, but I get an error:
> 
> 
> fm2.lme <- lme(fixed=resp ~ fact1*fact2, random=~1|subj/(fact1+fact2), data=mydata) 

-- 
Douglas Bates                            bates at stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list