[R-sig-ME] random slope by treatment interaction: specification

Ben Bolker bbolker at gmail.com
Tue Feb 7 19:35:54 CET 2017


On Tue, Feb 7, 2017 at 12:07 PM, Ramon Diaz-Uriarte <rdiaz02 at gmail.com> wrote:
>
> Dear All,
>
> I want to fit a model with a specification not unlike that given in Ben Bolker's
> http://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#model-specification
> the entry that says
>
> x*site + (x | site:block)
>
> "fixed effect variation of slope and intercept varying among sites and
> random variation of slope and intercept among blocks within sites".
>
>
> In my case, however, I have a fixed-effects treatment, not a
> (random-effect) site and blocks are not nested within treatment (they are
> crossed). And I am not sure what is the way to model this.
>
>
> I think a model like
>
> x*trt + (x | trt:block)
>
> is not really what I want: here, all the random slopes (intercepts) are
> modelled as coming from the same distribution, regardless of treatment.
>
>
> I think a specification like
>
> x*trt + (x*trt | block)
>
> is closer to what I want: for each block (not trt by block combination) I
> get distributions of slopes (intercepts) that might have a different
> variance for each trt.
>
> In addition, it seems (to me) to make some sort of sense to specify the
> same interaction in the fixed and random effects part (yes, a fixed by
> random interaction ought to be a random effect, but I care about the
> interactions between the fixed treatment and the x continuous covariate).
>
>
> Is the second specification sensible?
>

  Yes, if you could in principle estimate x*trt for every block (or
most blocks), i.e. there are measurements for multiple combinations of
x and trt in every block, then ~ x*trt + (x*trt|block) is sensible
[again, *in principle*].  But your PS is relevant - it may well not
make practical statistical sense to do so.

  You might be interested in https://github.com/dmbates/RePsychLing ...


> P.S. The actual models, with both specifications, sometimes run into
> convergence problems and I might be overfitting the data (e.g., huge
> correlations in the random effects estimates). But I think that is
> something I'd need to deal with once I really figure out the model to use.
> Spain



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