[R-sig-ME] random slope by treatment interaction: specification
Ramon Diaz-Uriarte
rdiaz02 at gmail.com
Tue Feb 7 22:28:38 CET 2017
Dear Ben,
On Tue, 07-02-2017, at 18:35, Ben Bolker <bbolker at gmail.com> wrote:
> 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
Yes, I do: I have about 190 (never less than 180) measures for each
block, with values of x that span the range of x's considered.
> [again, *in principle*]. But your PS is relevant - it may well not
> make practical statistical sense to do so.
>
But the convergence problems are also happening in the
x*trt + (x | trt:block)
specification, so I think it might be something else.
Actually, the full design is slightly more complex, and contains a "unit"
random effect, crossed with the block effect. This is a balanced design,
with 190 units measured under all the combinations of two treatments by 16
blocks (i.e., 32 measures per unit so a total of 6080 measures, except for
a few NAs ---24 total). Each unit is also characterized by an x.
I am modeling (at the moment) binomial data, and there could be
overdispersion, and the relationship between the binomial response and the
x seems either week or widely variable between blocks and treatment
combinations. And the convergence problems tend to be somewhat ameliorated
if I use uncorrelated random slopes and intercepts.
> You might be interested in https://github.com/dmbates/RePsychLing ...
>
Thanks! The paper seems most pertinet; reading for the morning commute.
Best,
R.
>
>> 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
--
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina
Universidad Autónoma de Madrid
Arzobispo Morcillo, 4
28029 Madrid
Spain
Phone: +34-91-497-2412
Email: rdiaz02 at gmail.com
ramon.diaz at iib.uam.es
http://ligarto.org/rdiaz
More information about the R-sig-mixed-models
mailing list