[R-sig-ME] Random-Intercept Random-Slope Models

Joshua Wiley jwiley.psych at gmail.com
Wed Jun 13 05:07:11 CEST 2012


Hi Eiko,

+ x1 just adds a main effect of x1 on the outcome.  That is how Rs formula interface works regardless of simple linear regression as with lm() or mixed models (including longitudinal of course).  "is really not something you want to do" depends entirely on what you want to do.  It is entirely sensible if you are trying to model baseline differences.  If what you really want to do is try to model differences in the time slope, then of course it is not something you want to do.  If that is what you want, include the interaction with time as:

time * (x1 + x2 + x3)

note that the * is important for that to work.

Cheers,

Josh

On Jun 12, 2012, at 18:31, Eiko Fried <torvon at gmail.com> wrote:

> Dear Mixed Models Mailing List.
> 
> Do I understand correctly that, for longitudinal data, the following syntax
> is really not something you want to do:
> 
> Y ~ time + x1 + x2 +x3 + ( time | subject )
> 
> because significant effects on the covariates would simply refer to the
> intercept of the first measurement point?
> 
> Instead, the model would have to look like this:
> 
> Y ~time (x1 + x2 +x3 ) + ( time | subject)
> 
> to have the covariates also predict differences in slope. Is that correct?
> 
> If this is the case, I don't quite understand most of the R tutorials for
> mixed models out there, because they nearly all use the first notation.
> 
> Thanks for clarifying, I'm a but confused.
> 
> ~~Eiko
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list