[R-sig-ME] question regarding summary output with three-way interactions

Szymek Drobniak geralttee at gmail.com
Fri Jan 6 21:05:38 CET 2012


Hi again,

you're right. usually when terms are missing in our output - it means
the're not identifiable from our data (e.g. there's not enough
replication or specific combinations of factors are missing) - that's
why your'e getting some interactions tested after removing some other
terms. As for which terms to include - my conservative way of doing
things is to include lower terms always when I want to have higher
terms. What happens when you remove the triple interactions? Also I
wouldn;t say that interpretation of continous:categorical interactions
 should be avoided in cases similar to yours: such interactions
quantify differences in betas at respective levels of the categorical
variable and provide useful valuable insight to how your response
changes with the covariate. What however should be avoided (or better
said - applied with caution) is drawing conclusions about categorical
variables (i.e. A or B in your model) if the're involved in
significant interactions with continous variables (problem similar to
heterogenous slopes in classical ANCOVA).

Cheers,
sz.

On 6 January 2012 20:40, Stefanie Kuchinsky
<stefanie.kuchinsky at gmail.com> wrote:
>
> I just realized a probable explanation.
>
> For the time3 term for which it only displayed half of the interaction term, the lower order time3:A and time3:B had been included in the model.
>
> However, there was no time4:A in the model (though there was time4:B). When I removed this effect, I now get both parts of the interaction term output [and the F test df are now correct (2, 9294) instead of (1, 9294)]. I assume that this means the higher order terms are redundant with the lower order terms in the model.
>
> Is it then appropriate to remove the lower order interactions from the model (even though they appear significant when I run anova() and given their betas)? I believe I should not be theoretically interpreting time3:A when there is a time3:A:B interaction, anyway.
>
> So, I would interpret the betas for these terms very generally:
> time3:A1:B0 -- The effect of the cubic polynomial modulated by A (1 > 0) when B is held constant at 0.
> time3:A1:B1 -- The effect of the cubic polynomial as modulated by A (1>0) when B is held constant at 1.
>
> Thanks again for your input-- I wouldn't have thought of this is you hadn't mentioned looking at the lower order terms.
>
>
>
> On Fri, Jan 6, 2012 at 1:55 PM, Stefanie Kuchinsky <stefanie.kuchinsky at gmail.com> wrote:
>>
>> Thanks so much for your response. I had not included some of the output table to save space in the original email, but the model does include the lower order terms. I've pasted the full table at the bottom of this email. The polynomial terms were indeed created with the poly() function.
>>
>> You were exactly right about the continuous vs. factor error in my second dataset. I had a typo in my code and so B had never been converted to a factor. I really appreciate you catching that!
>>
>> However, I'm still confused about the interpretation of time4:A1:B1-- specifically why there is no beta for time4:A1:B0 when there is both a beta for time3:A1:B1 and time3:A1:B0?
>>
>>
>> Again, snippet of dataset 1 output:
>>
>> time3:A1:B1   -68.6999  33.14614 9294  -2.07264  0.0382
>> time4:A1:B0   132.5765  23.43786 9294   5.65651  0.0000
>> time4:A1:B1  -124.2845  23.43786 9294  -5.30272  0.0000
>>
>> Corrected output for dataset 2:
>> time3:A1:B1   135.0679   46.2636 9294   2.91953  0.0035
>> time4:A1:B0    80.8813   32.7133 9294   2.47243  0.0134
>> time4:A1:B1  -108.9340   32.7133 9294  -3.32996  0.0009
>>
>>
>> Full table for dataset 1(minus the correlation tables):
>>
>> > summary(m.int4e)
>> Linear mixed-effects model fit by maximum likelihood
>>  Data: Data
>>        AIC      BIC    logLik
>>   109842.6 110837.5 -54782.28
>>
>> Random effects:
>>  Formula: ~time1 | subjAB
>>  Structure: General positive-definite, Log-Cholesky parametrization
>>             StdDev    Corr
>> (Intercept)  38.33670 (Intr)
>> time1         434.94747 0.488
>> Residual     75.40533
>>
>> Fixed effects: pupil1000 ~ time1 + time2 + time3 + time4 + time5 + subj + subj:time1 + subj:time2 +      subj:time3 + subj:time4 + subj:time5 + A:time1 + A:time2 + A:time3 +      A:time5 + B:time3 + B:time4 + A:B:time3 + A:B:time4
>>                        Value Std.Error   DF   t-value p-value
>> (Intercept)         976.6327  19.63384 9294  49.74231  0.0000
>> time1                 891.8779 226.37671 9294   3.93980  0.0001
>> time2                -917.0701  38.86729 9294 -23.59491  0.0000
>> time3                -131.3754  40.59556 9294  -3.23620  0.0012
>> time4                 459.9003  40.59556 9294  11.32883  0.0000
>> time5                -444.2458  38.86729 9294 -11.42981  0.0000
>> subj2                47.7965  27.76645   63   1.72137  0.0901
>> subj3                65.4712  27.76645   63   2.35793  0.0215
>> subj4               130.2721  27.76645   63   4.69171  0.0000
>> subj5                57.2987  27.76645   63   2.06359  0.0432
>> subj6                25.6571  27.76645   63   0.92403  0.3590
>> subj7                -7.6969  27.76645   63  -0.27720  0.7825
>> subj8                81.3031  27.76645   63   2.92811  0.0047
>> subj9                15.1726  27.76645   63   0.54644  0.5867
>> subj10               62.5996  27.76645   63   2.25450  0.0276
>> subj11              -64.4270  27.76645   63  -2.32032  0.0236
>> subj12               10.0465  27.76645   63   0.36182  0.7187
>> subj13               43.7500  27.76645   63   1.57564  0.1201
>> subj14               26.4845  27.76645   63   0.95383  0.3438
>> subj15              -46.7323  27.76645   63  -1.68305  0.0973
>> subj16              137.6261  27.76645   63   4.95656  0.0000
>> subj17               14.9735  27.76645   63   0.53926  0.5916
>> subj18               26.3230  27.76645   63   0.94802  0.3467
>> subj19               55.4912  27.76645   63   1.99850  0.0500
>> subj20               98.4027  27.76645   63   3.54394  0.0007
>> subj21              162.8186  27.76645   63   5.86386  0.0000
>> time1:subj2          -848.2627 314.38569 9294  -2.69816  0.0070
>> time1:subj3          -462.8857 314.38569 9294  -1.47235  0.1410
>> time1:subj4          -286.9459 314.38569 9294  -0.91272  0.3614
>> time1:subj5          -350.9655 314.38569 9294  -1.11635  0.2643
>> time1:subj6         -1079.1256 314.38569 9294  -3.43249  0.0006
>> time1:subj7          -958.1396 314.38569 9294  -3.04766  0.0023
>> time1:subj8           396.6793 314.38569 9294   1.26176  0.2071
>> time1:subj9           870.7418 314.38569 9294   2.76966  0.0056
>> time1:subj10         2433.2401 314.38569 9294   7.73967  0.0000
>> time1:subj11          518.0574 314.38569 9294   1.64784  0.0994
>> time1:subj12         -544.9605 314.38569 9294  -1.73341  0.0831
>> time1:subj13         -142.6669 314.38569 9294  -0.45380  0.6500
>> time1:subj14         -447.2835 314.38569 9294  -1.42272  0.1549
>> time1:subj15           73.0371 314.38569 9294   0.23232  0.8163
>> time1:subj16         -147.8436 314.38569 9294  -0.47026  0.6382
>> time1:subj17         -321.5527 314.38569 9294  -1.02280  0.3064
>> time1:subj18        -1104.0885 314.38569 9294  -3.51189  0.0004
>> time1:subj19         -500.0802 314.38569 9294  -1.59066  0.1117
>> time1:subj20           73.0061 314.38569 9294   0.23222  0.8164
>> time1:subj21         -977.4932 314.38569 9294  -3.10922  0.0019
>> time2:subj2           103.9564  53.70288 9294   1.93577  0.0529
>> time2:subj3           462.7823  53.70288 9294   8.61746  0.0000
>> time2:subj4           133.1718  53.70288 9294   2.47979  0.0132
>> time2:subj5           435.4522  53.70288 9294   8.10854  0.0000
>> time2:subj6           866.3608  53.70288 9294  16.13248  0.0000
>> time2:subj7          1040.2131  53.70288 9294  19.36978  0.0000
>> time2:subj8           -48.0412  53.70288 9294  -0.89457  0.3710
>> time2:subj9           -33.9246  53.70288 9294  -0.63171  0.5276
>> time2:subj10          575.5907  53.70288 9294  10.71806  0.0000
>> time2:subj11         -534.9280  53.70288 9294  -9.96088  0.0000
>> time2:subj12          180.5477  53.70288 9294   3.36197  0.0008
>> time2:subj13         -919.1235  53.70288 9294 -17.11498  0.0000
>> time2:subj14          585.8640  53.70288 9294  10.90936  0.0000
>> time2:subj15          405.6596  53.70288 9294   7.55378  0.0000
>> time2:subj16        -1104.0865  53.70288 9294 -20.55917  0.0000
>> time2:subj17          877.9724  53.70288 9294  16.34870  0.0000
>> time2:subj18         1828.7923  53.70288 9294  34.05389  0.0000
>> time2:subj19          820.0829  53.70288 9294  15.27074  0.0000
>> time2:subj20           44.1932  53.70288 9294   0.82292  0.4106
>> time2:subj21          845.2039  53.70288 9294  15.73852  0.0000
>> time3:subj2           658.7997  53.70288 9294  12.26749  0.0000
>> time3:subj3            30.3625  53.70288 9294   0.56538  0.5718
>> time3:subj4           595.8939  53.70288 9294  11.09612  0.0000
>> time3:subj5           243.5716  53.70288 9294   4.53554  0.0000
>> time3:subj6           350.5870  53.70288 9294   6.52827  0.0000
>> time3:subj7            62.7208  53.70288 9294   1.16792  0.2429
>> time3:subj8           187.1384  53.70288 9294   3.48470  0.0005
>> time3:subj9          -745.5636  53.70288 9294 -13.88312  0.0000
>> time3:subj10         -937.4916  53.70288 9294 -17.45701  0.0000
>> time3:subj11          349.5809  53.70288 9294   6.50954  0.0000
>> time3:subj12         -419.0377  53.70288 9294  -7.80289  0.0000
>> time3:subj13          812.8245  53.70288 9294  15.13558  0.0000
>> time3:subj14          179.8396  53.70288 9294   3.34879  0.0008
>> time3:subj15         -150.8652  53.70288 9294  -2.80926  0.0050
>> time3:subj16         1267.6097  53.70288 9294  23.60413  0.0000
>> time3:subj17          223.1138  53.70288 9294   4.15460  0.0000
>> time3:subj18           83.5245  53.70288 9294   1.55531  0.1199
>> time3:subj19         1295.0211  53.70288 9294  24.11455  0.0000
>> time3:subj20          599.0144  53.70288 9294  11.15423  0.0000
>> time3:subj21          142.3725  53.70288 9294   2.65111  0.0080
>> time4:subj2          -357.4785  53.70288 9294  -6.65660  0.0000
>> time4:subj3          -343.2897  53.70288 9294  -6.39239  0.0000
>> time4:subj4          -705.7852  53.70288 9294 -13.14241  0.0000
>> time4:subj5          -445.1367  53.70288 9294  -8.28888  0.0000
>> time4:subj6          -602.6113  53.70288 9294 -11.22121  0.0000
>> time4:subj7          -421.4880  53.70288 9294  -7.84852  0.0000
>> time4:subj8            30.3527  53.70288 9294   0.56520  0.5720
>> time4:subj9           563.3041  53.70288 9294  10.48927  0.0000
>> time4:subj10         -206.4712  53.70288 9294  -3.84470  0.0001
>> time4:subj11          515.5052  53.70288 9294   9.59921  0.0000
>> time4:subj12          184.6193  53.70288 9294   3.43779  0.0006
>> time4:subj13          293.2901  53.70288 9294   5.46135  0.0000
>> time4:subj14         -478.9555  53.70288 9294  -8.91862  0.0000
>> time4:subj15         -240.5382  53.70288 9294  -4.47906  0.0000
>> time4:subj16         -975.5266  53.70288 9294 -18.16526  0.0000
>> time4:subj17         -403.4663  53.70288 9294  -7.51294  0.0000
>> time4:subj18         -876.2704  53.70288 9294 -16.31701  0.0000
>> time4:subj19        -1979.2893  53.70288 9294 -36.85629  0.0000
>> time4:subj20         -534.4526  53.70288 9294  -9.95203  0.0000
>> time4:subj21         -448.4306  53.70288 9294  -8.35022  0.0000
>> time5:subj2           -10.8598  53.70288 9294  -0.20222  0.8397
>> time5:subj3           356.3984  53.70288 9294   6.63649  0.0000
>> time5:subj4           321.0171  53.70288 9294   5.97765  0.0000
>> time5:subj5           159.0899  53.70288 9294   2.96241  0.0031
>> time5:subj6           277.8362  53.70288 9294   5.17358  0.0000
>> time5:subj7           392.0390  53.70288 9294   7.30015  0.0000
>> time5:subj8            76.0262  53.70288 9294   1.41568  0.1569
>> time5:subj9           675.6410  53.70288 9294  12.58109  0.0000
>> time5:subj10          739.3099  53.70288 9294  13.76667  0.0000
>> time5:subj11         -218.8505  53.70288 9294  -4.07521  0.0000
>> time5:subj12          315.8796  53.70288 9294   5.88199  0.0000
>> time5:subj13         -248.9957  53.70288 9294  -4.63654  0.0000
>> time5:subj14          396.2154  53.70288 9294   7.37792  0.0000
>> time5:subj15          231.0236  53.70288 9294   4.30188  0.0000
>> time5:subj16          224.9218  53.70288 9294   4.18826  0.0000
>> time5:subj17          209.4774  53.70288 9294   3.90067  0.0001
>> time5:subj18          505.3070  53.70288 9294   9.40931  0.0000
>> time5:subj19          369.0887  53.70288 9294   6.87279  0.0000
>> time5:subj20          275.5678  53.70288 9294   5.13134  0.0000
>> time5:subj21          480.7268  53.70288 9294   8.95160  0.0000
>>
>>
>> time1:A1            353.1338  85.49229 9294   4.13059  0.0000
>> time2:A1            -68.5389  16.57307 9294  -4.13556  0.0000
>> time3:A1           -154.4407  23.43786 9294  -6.58937  0.0000
>> time5:A1            123.8607  16.57307 9294   7.47361  0.0000
>> time3:B1        100.1996  23.43786 9294   4.27512  0.0000
>> time4:B1        201.6411  23.43786 9294   8.60322  0.0000
>> time3:A1:B1   -68.6999  33.14614 9294  -2.07264  0.0382
>> time4:A1:B0   132.5765  23.43786 9294   5.65651  0.0000
>> time4:A1:B1  -124.2845  23.43786 9294  -5.30272  0.0000
>>
>>
>>
>>
>>
>> On Fri, Jan 6, 2012 at 1:08 PM, Szymek Drobniak <geralttee at gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> for me it's unclear how you specify your data and your model. in general - it seems that you're using user-made polynomial terms? or have you used the poly() function to form them? I'm asking because you don't have most of the lower-order terms in your output. as for the interaction - it's interpretation is fairly straightforward. E.g. interaction of time4:A1:B1 contains the fourth order coefficient of regression for your relationship in the objects from both A1 and B1 groups. The lack of 0/1 next to B in the second example may be caused by accidental conversion of B into numerical (rather than factor) variable - in such a situation it would be treated as continous variable and just a single regression coefficient would be returned.
>>>
>>> cheers,
>>> sz.
>>>
>>> --
>>> Szymon Drobniak || Population Ecology Group
>>> Institute of Environmental Sciences, Jagiellonian University
>>> ul. Gronostajowa 7, 30-387 Kraków, POLAND
>>> tel.: +48 12 664 51 79 fax: +48 12 664 69 12
>>>
>>> www.eko.uj.edu.pl/drobniak
>>
>>
>



--
Szymon Drobniak || Population Ecology Group
Institute of Environmental Sciences, Jagiellonian University
ul. Gronostajowa 7, 30-387 Kraków, POLAND
tel.: +48 12 664 51 79 fax: +48 12 664 69 12

www.eko.uj.edu.pl/drobniak




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