Skip to content
Prev 295173 / 398506 Next

Syntax for lme function to model random factors and interactions

Hi,

See inline below
On Mon, May 21, 2012 at 6:03 AM, i_like_macs <dkoya at mac.com> wrote:
Do they need to be specified for the model to run?  No.  Do they need
to be specified for the model to make sense?  That depends on your
data, theory, and what question you are trying to answer.  I think you
would be better off posting this sort of question to
R-sig-mixedeffects list.  That said, it sounds to me like maybe it
would be easiest to spend some more time learning about mixed effects
models (I know they can be tricky) and then come back to trying to
specify the model in R.  We can help with the code aspect, but do not
typically provide statistical advice on what is or is not an
appropriate model.
note that this can be written much more succinctly as:

lme(Y ~ (A + B + C + D)^3, data = myData, random = ~ 1 | C, method = "ML")

which will expand to all three-way interactions and lower terms.  Have
you tried running this model?

Cheers,

Josh