[R-sig-ME] random effects for a second-order polynomial

Phillip Alday me @end|ng |rom ph||||p@|d@y@com
Tue Mar 22 19:38:32 CET 2022


Hi John,

I'm going to try for a quick, intuitive answer in the hope that it's
more helpful to have some quick comments than for a comprehensive answer
sometime in the future.

The increase in variance in the RE surprised me a lot at first glance
but I think it's okay. Here's my thinking:

- The linear term in the two models doesn't directly correspond if
you're using orthogonal polynomials (raw=FALSE, which is the default).
You would need poly(scStep, 1) for a more direct comparison.
- Assuming that the the variance in the quadratic term is correct, that
variance carries over into the variance for the linear term just because
of their covariance (i.e. correlation).
- In the model without a random effect for the quadratic term, the
participant-level variation is constrained essentially by the extrema
and means because those are the points that the line has to pass
through. For the quadratic model, the linear term corresponds to a more
complicated shifting of the overall parabola and so the constraint is
looser. Very, very hand-wavy -- this is essentially the dual of the
previous point.

I would check out the first point and see if the change between the
linear and quadratic model is more reasonable.

Hope that helps,
Phillip

On 18/3/22 4:44 pm, John Kingston wrote:
> I am trying to model response times in an experiment in which listeners
> hear one of five synthesized syllables, one which is clearly "da", another
> which is clearly "ga", or one of three steps in between the clear "da" and
> clear "ga", which differ in how ambiguous they are between the clear "da"
> or "ga". Listeners must identify each syllable as "da" or "ga". As is
> typical in such experiments, response times are much faster to the clear
> instances of each syllable than to the ambiguous steps in between them, and
> a plot of response times against the steps along this series of syllables,
> da 2 3 4 ga, has roughly the shape of an inverted parabola. So, I naturally
> modeled the effect of the series with poly(step, 2), and I obtained an
> expected negative estimate for the second-order term. My question concerns
> the random effect structure. When I include only a first-order effect of
> step in the random effects, like this (scDgRsp = whether the response was
> "da" or "ga"):
> 
> dgRTStep0 <- lmer(logRT ~ scDgRsp +
>                     poly(scStep, 2)  +
>                 (1 | participant) +
>                 (0 + scDgRsp | participant) +
>                 (0 + scStep | participant),
>                     control = lmerControl(optimizer="bobyqa",
>                                            optCtrl=list(maxfun=2e5)),
>               data = dgTestTrim)
> 
> I get this as the random effects:
> 
> Random effects:
>  Groups        Name        Variance  Std.Dev.
>  participant   (Intercept) 0.0051506 0.07177
>  participant.1 scDgRsp     0.0005302 0.02303
>  participant.2 scStep      0.0002087 0.01445
>  Residual                  0.0194742 0.13955
> Number of obs: 13272, groups:  participant, 28
> 
> 
> but when I include the second-order term, like this:
> 
> 
> dgRTStep1 <- lmer(logRT ~ scDgRsp +
>                     poly(scStep, 2)  +
>                 (1 | participant) +
>                 (0 + scDgRsp | participant) +
>                 (0 + poly(scStep, 2) | participant),
>                     control = lmerControl(optimizer="bobyqa",
>                                            optCtrl=list(maxfun=2e5)),
>               data = dgTestTrim)
> 
> 
> I get this instead:
> 
> 
> Random effects:
>  Groups        Name             Variance  Std.Dev. Corr
>  participant   (Intercept)      0.0051593 0.07183
>  participant.1 scDgRsp          0.0005799 0.02408
>  participant.2 poly(scStep, 2)1 3.5037792 1.87184
>                poly(scStep, 2)2 1.8811428 1.37155  -0.57
>  Residual                       0.0193518 0.13911
> Number of obs: 13272, groups:  participant, 28
> 
> 
> I'm not so puzzled by the correlation as the sizes of the randow
> effects, which four orders of magnitude larger. Is this sensible,
> interpretable?
> 
> 
> The fixed effects estimates differ little between the two models:
> 
> 
> poly(scStep, 2)1  1.077e+00  3.841e-01  2.825e+01   2.804 0.009033 **
> poly(scStep, 2)2 -2.969e+00  1.502e-01  1.300e+04 -19.768  < 2e-16 ***
> 
> 
> versus
> 
> 
> poly(scStep, 2)1  1.102060   0.418011 27.340208   2.636 0.013648 *
> poly(scStep, 2)2 -2.968686   0.299938 27.103765  -9.898  1.7e-10 ***
> 
> 
> except in the standard errors and degrees of freedom for the
> second-order estimate.
> 
> 
> Thanks!
> 
> 
> Best,
> 
> John Kingston
> Professor
> Linguistics Department
> University of Massachusetts
> N434 Integrative Learning Center
> 650 N. Pleasant Street
> Amherst, MA 01003
> 1-413-545-6833, fax -2792
> jkingstn using umass.edu
> https://blogs.umass.edu/jkingstn
> <https://blogs.umass.edu/jkingstn/wp-admin/>
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using 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