0
$\begingroup$

I've looked for a question that could possibly cover this but I did not find any. It may be basic but as a R beginner I'm strugling with it. So here it is:

I'm running a mixed effect model to test the effects of body condition and body size (both continuous), and their interaction with the categorical variable stimulus, that has three levels (visual, acoustic and multimodal) on frog calls, with male id (ind) as a random factor. I'm not interested in the main effect of stimulus in this model because I've tested the effect of each stimulus type and their controls in a previous model.

  1. The thing here is that I cannot get the effects of condition:stimVISUAL and size:stimVISUAL in the model summary. My understanding is that one of these is the model intercept, however I would like to have the effects of the interactions also with this stimulus level in order to generate an effect size figure directly from the model. I can get the effects of condition:stimVISUAL and size:stimVISUAL if I ommit the main effects from the model, i.e retaining only the interaction terms, but this way I miss the main effects of condition and size. How can I get the effects of condition:stimVISUAL and size:stimVISUAL? Here is the model:
    Family: poisson  ( log )
    Formula:          call ~ condition + size + condition:stim + size:stim + (1 | ind)
    Data: callq

         AIC      BIC   logLik deviance df.resid 
      1911.5   1930.8   -947.8   1895.5       74 

    Random effects:

    Conditional model:
     Groups Name        Variance Std.Dev.
     ind    (Intercept) 3.635    1.907   
    Number of obs: 82, groups:  ind, 38

    Conditional model:
                              Estimate Std. Error z value Pr(>|z|)    
    (Intercept)               4.460885   0.309739  14.402  < 2e-16 ***
    condition                -0.467735   0.423904  -1.103   0.2699    
    size                      0.905614   0.159851   5.665 1.47e-08 ***
    condition:stimacoustic   -0.097809   0.047011  -2.081   0.0375 *  
    condition:stimmultimodal -0.008957   0.045172  -0.198   0.8428    
    size:stimacoustic         0.955551   0.086652  11.027  < 2e-16 ***
    size:stimmultimodal       0.918539   0.081825  11.226  < 2e-16 ***
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
  1. Another doubt is about modelling an interaction-only model. I've seem this is kind a hot debate but based on

https://stats.idre.ucla.edu/stata/faq/what-happens-if-you-omit-the-main-effect-in-a-regression-model-with-an-interaction/

it seems that the interaction-only model is just a reparameterization of the “full” model. Indeed, this is indeed true when I run an interaction-only model from my data. So, does it make sense to fit the interaction-only over the full model? Here is the interaction-only model:

     Family: poisson  ( log )
    Formula:          call ~ condition:stim + size:stim + (1 | ind)
    Data: callq

         AIC      BIC   logLik deviance df.resid 
      1911.5   1930.8   -947.8   1895.5       74 

    Random effects:

    Conditional model:
     Groups Name        Variance Std.Dev.
     ind    (Intercept) 3.635    1.907   
    Number of obs: 82, groups:  ind, 38

    Conditional model:
                             Estimate Std. Error z value Pr(>|z|)    
    (Intercept)                4.4609     0.3097  14.402  < 2e-16 ***
    condition:stimvisual      -0.4677     0.4239  -1.103    0.270    
    condition:stimacoustic    -0.5656     0.4364  -1.296    0.195    
    condition:stimmultimodal  -0.4767     0.4153  -1.148    0.251    
    stimvisual:size            0.9056     0.1599   5.665 1.47e-08 ***
    stimacoustic:size          1.8612     0.2253   8.261  < 2e-16 ***
    stimmultimodal:size        1.8242     0.2200   8.292  < 2e-16 ***
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Thank you,

$\endgroup$
1
$\begingroup$

It's not generally a good idea to model interactions without the corresponding "main effects." This page goes in to extensive discussion on the matter. So your first approach, with the full model, is best.

With the full model you're not really "missing" those interaction terms. The interaction terms represent the differences from the effects that would be predicted based solely on the coefficients for the main effects themselves. The intercept for that model represents the prediction for condition=0, size=0, and stimulus='visual' (the reference level of that factor). The slopes for condition and size are those for stimulus='visual'. The interactions represent the differences from those slopes under the other stimulus values. So all the information you need is included within that model.

If there are particular comparisons or predictions that you want to make based on the model, or you want to compare particular scenarios to some type of average response (e.g., comparing each stimulus type to the average among all stimulus types for some values of size and condition), the simplest approach would be to learn to use software that does that for you based on the model you have built. The emmeans package in R does this quite well, with many worked examples and a package author who visits this site.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ thank you @EdM. I've used emmeans to estimate means and contrasts between experimental phases, so I have some knowledge on it. I understood that the full model contains the information I need. I'm trying to get a florest plot (sjPlot) from the full model, but from it effects of condition:visual and size:visual don't appear. Maybe all I have to do is to indicate the ref level in the plot? Something like this: researchgate.net/publication/335947741/figure/fig3/… $\endgroup$ – vmc May 27 at 12:52
  • $\begingroup$ @vmc a forest plot will display results relative to some null hypothesis or a reference condition. Specifying the reference level, as in the figure you linked, is one straightforward way to deal with this, but you then should also make sure to note in the legend what the predicted response was at the reference conditions. If it makes sense based on your application, you could consider using an overall mean among the 3 conditions as the reference and use emmeans to get the point estimates and confidence intervals needed to generate the plot. I don't have experience with sjPlot per se. $\endgroup$ – EdM May 27 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.