[R-lang] Re: Investigating random slope variance
Titus von der Malsburg
malsburg@posteo.de
Thu Apr 3 11:31:10 PDT 2014
Hi Roger!
On 2014-04-03 Thu 18:32, Levy, Roger <rlevy@ucsd.edu> wrote:
> My interpretation would be as follows: in aggregate, there is ample
> evidence in your dataset that there is variation across items in the
> effect of condition, but you don’t have enough data on any individual
> item to conclude securely that *that particular item’s sensitivity* is
> significantly different from the group average in one direction or the
> other.
Hm, that's what I was afraid of.
>> - What's the proper way to find out which regions were significantly
>> slowed down and which were speeded up by the manipulation?
>
> Sorry, did you mean regions or items? I’m assuming below that you
> meant items...
Regions and items are the same thing here because the participants read
only one text and the regions within the text act like the items in a
more typical reading experiment.
> It looks like you are using treatment coding for item, which renders
> the interpretation of your coefficients for this model a bit different
> than those in your dot plot. How do things look when you use sum
> coding for item?
Good catch! I intended to use contr.sum but due to a typo I ended up
using the default contrast. The summary for the model using the sum
contrast is at the bottom of this mail. Obviously, the results look
different from the results that I got when using the treatment contrast
but they are still inconsistent with the dotplot. In the dotplot, I
find a positive slope for item 25 and a borderline significant negative
slope for item 36. In the model using item as a fixed effect, I find
significant negative effects for items 11 and 36 and positive effects
for items 35 and 23.
It seems that the fixed-effects model is more consistent with the
descriptive stats:
> with(d, tapply(trt, list(item, cond), mean, na.rm=T))
A B
1 1165.3636 1128.5652
2 992.5455 1144.6087
3 602.1818 583.0909
4 613.9048 719.3913
5 599.8182 646.8696
6 406.9048 489.2174
7 620.0000 589.0435
8 644.5000 763.8696
9 576.3182 631.8696
10 596.3182 600.7826
11 806.8182 660.3913 * signf. in fixef-mode
12 442.9524 552.4783
13 1084.0000 1008.9130
14 994.4091 878.1739
15 898.4545 797.3913
16 1037.9545 1113.6087
17 1186.4545 1162.0435
18 608.6818 786.2174
19 582.6818 647.2727
20 617.4545 618.2609
21 434.7727 642.8095
22 1179.8182 1031.2609
23 528.2727 721.2609 * signf. in fixef-mode
24 571.5455 600.5909
25 319.6190 386.0435 * signf. in dotplot
26 851.6364 713.3913
27 1528.5909 1486.6957
28 720.3182 603.8261
29 726.9091 773.9565
30 381.8095 452.8636
31 846.6818 976.2273
32 634.2273 878.5652
33 740.1818 748.4348
34 713.7727 879.3913
35 720.8182 1052.8696 * signf. in fixef-mode
36 1216.5909 921.2174 * signf. in fixef-mode and dotplot
37 594.8636 588.9565
38 459.5909 624.8261
39 690.1818 885.2727
40 449.6818 628.0870
> One last thing — I would recommend that you double-check all your
> analyses using lme4.0. People have been reporting odd and
> contradictory results with the newest version of lme4, especially when
> using the default optimizer.
I reran the models using the bobyqa and optimx (method="nlminb") and got the same results.
Titus
Summary of model using sum-coded items as fixed effect:
Linear mixed model fit by maximum likelihood ['lmerMod']
Formula: log(trt) ~ item * cond + (1 | subj)
Data: d
Control: lmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
2311.5 2761.5 -1073.7 2147.5 1705
Scaled residuals:
Min 1Q Median 3Q Max
-3.8821 -0.6375 -0.0172 0.6402 3.5181
Random effects:
Groups Name Variance Std.Dev.
subj (Intercept) 0.07732 0.2781
Residual 0.18107 0.4255
Number of obs: 1787, groups: subj, 45
Fixed effects:
Estimate Std. Error t value
(Intercept) 6.446746 0.042668 151.09
item1 0.481033 0.062657 7.68
item2 0.381353 0.062657 6.09
item3 0.214172 0.063347 -3.38
item4 0.065494 0.063414 -1.03
item5 0.164766 0.062657 -2.63
item6 0.489277 0.063414 -7.72
item7 0.103389 0.062657 -1.65
item8 0.007107 0.062657 0.11
item9 0.151968 0.062657 -2.43
item10 0.187189 0.062657 -2.99
item11 0.022083 0.062657 0.35
item12 0.342824 0.063414 -5.41
item13 0.421248 0.062657 6.72
item14 0.265824 0.062657 4.24
item15 0.095553 0.062657 1.53
item16 0.428998 0.062657 6.85
item17 0.508100 0.062657 8.11
item18 0.104577 0.062657 -1.67
item19 0.189842 0.063348 -3.00
item20 0.176217 0.062657 -2.81
item21 0.346756 0.064095 -5.41
item22 0.464940 0.062657 7.42
item23 0.211371 0.062657 -3.37
item24 0.239727 0.063348 -3.78
item25 0.702424 0.063414 -11.08
item26 0.074705 0.062657 1.19
item27 0.778773 0.062657 12.43
item28 0.065349 0.062657 -1.04
item29 0.076321 0.062657 1.22
item30 0.529148 0.064096 -8.26
item31 0.253587 0.063347 4.00
item32 0.028338 0.062657 -0.45
item33 0.062202 0.062657 0.99
item34 0.110623 0.062657 1.77
item35 0.205651 0.062657 3.28
item36 0.411933 0.062657 6.57
item37 0.237561 0.062657 -3.79
item38 0.293674 0.062657 -4.69
item39 0.104801 0.063348 1.65
condB-A 0.062645 0.085337 0.73
item1:condB-A -0.099294 0.125314 -0.79
item2:condB-A 0.116658 0.125314 0.93
item3:condB-A -0.124696 0.126694 -0.98
item4:condB-A 0.169267 0.126827 1.33
item5:condB-A 0.010062 0.125314 0.08
item6:condB-A 0.029288 0.126827 0.23
item7:condB-A -0.159953 0.125314 -1.28
item8:condB-A 0.082437 0.125314 0.66
item9:condB-A -0.088934 0.125314 -0.71
item10:condB-A -0.031815 0.125314 -0.25
item11:condB-A -0.315189 0.125314 -2.52
item12:condB-A 0.196759 0.126827 1.55
item13:condB-A -0.138070 0.125314 -1.10
item14:condB-A -0.193227 0.125314 -1.54
item15:condB-A -0.188834 0.125314 -1.51
item16:condB-A -0.023788 0.125314 -0.19
item17:condB-A -0.052790 0.125314 -0.42
item18:condB-A 0.037642 0.125314 0.30
item19:condB-A -0.011895 0.126697 -0.09
item20:condB-A -0.135061 0.125314 -1.08
item21:condB-A 0.211311 0.128191 1.65
item22:condB-A -0.184232 0.125314 -1.47
item23:condB-A 0.319074 0.125314 2.55
item24:condB-A -0.018217 0.126697 -0.14
item25:condB-A 0.216689 0.126827 1.71
item26:condB-A -0.192187 0.125314 -1.53
item27:condB-A -0.073881 0.125314 -0.59
item28:condB-A -0.147357 0.125314 -1.18
item29:condB-A -0.055930 0.125314 -0.45
item30:condB-A 0.091677 0.128193 0.72
item31:condB-A 0.055254 0.126694 0.44
item32:condB-A 0.170249 0.125314 1.36
item33:condB-A -0.021665 0.125314 -0.17
item34:condB-A 0.075640 0.125314 0.60
item35:condB-A 0.261821 0.125314 2.09
item36:condB-A -0.316347 0.125314 -2.52
item37:condB-A 0.001981 0.125314 0.02
item38:condB-A 0.157791 0.125314 1.26
item39:condB-A 0.105193 0.126697 0.83
Correlation matrix not shown by default, as p = 80 > 20.
Use print(...., correlation=TRUE) or
vcov(....) if you need it
More information about the ling-r-lang-L
mailing list