3

I have activity levels of dogs and want to assess whether toy presence, toy groups, age, and the presence of toys on weekdays and weekends can affect the activity levels(DV).

The best way I thought of running a linear mixed effect model with collar activity was the following syntax in R using the lme4 package:

DV ~ Toy presence * toy group + age + (1|DogID)

or like this:

DV ~ Toy presence * toy group + age + Toy presence * week + (1|DogID)

or sorting out the activity level only in the presence of toys and evaluating the effect of the week (weekend/weekday) on activity levels. Running this gives the estimates of weekdays vs weekends.

However, if I use the first approach and have two interactions in a model, the results are quite different. So, I am confused about which way to approach this.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 14 '24 at 19:01
  • Outcome variable: lmer(Activity levels ~ Toy presence * Toy Groups+ Age +(1|DogID)), but I have to assess the effect of the presence of toys on the variable week(weekday and weekend). So, should I include this variable in the same model but the activity levels in the first model included data points in the toy absence too? But I need to assess only the effect of the week on collar activity levels(only in toy presence) – Guestuser2345 Jan 14 '24 at 19:24
  • 1
    Welcome to Cross Validated! You usually want to use a single model that is as comprehensive as reasonable, given the scope of your data set. I suspect that the apparent differences in results of the models have more to do with the complications of interpreting regression coefficients when there are interactions than with true differences in the net results of the models. Please show the results of each of your two models by editing the question. That will make it more likely that you will get a helpful answer. When you do that, see how my edit using "```" improved the readability of the code. – EdM Jan 14 '24 at 20:21
  • Btw I have edited your syntax to include DV as your dependent variable, as the pseudocode otherwise doesn't make sense. – Shawn Hemelstrand Jan 14 '24 at 21:18

1 Answers1

2

It isn't surprising to sometimes have regressions where the estimates change based off more/less terms. Are these effects real or false? The steps for running and understanding interaction models should really go something like this:

  1. Understand the theoretical rationale for including the interaction if there indeed even is an interaction that is plausible. The first part of this answer here for example explains the sometimes perplexing notion behind an interaction whose product is the only part that is statistically significant. In your case, why for example is toy presence likely to change by week? These are things to consider carefully.
  2. Model the interaction directly. This is usually straightforward, but its useful to consider what interactions are necessary to include. This question for example has many unlikely interactions that are not driven by theory and potentially overfit the model.
  3. Plot the interactions. This really should be one of the most important determinants to finding out if your interactions are at least visible. I show a categorical example here (where the interaction is strong) and a continuous example here (in the second part of the answer, where the interaction is poor). You may have completely spurious or chance interactions that warrant investigating with visualization.
  4. Model comparison. If your beliefs about each interaction model are determined a priori as being theoretically useful, it may also be helpful to check which model is a better balance between parsimony and predictive power. Checking AIC/BIC of each model is one way, which is easily implemented in mixed modeling packages like lme4.

How you interpret it from there is strictly up to the above points and your own intuition about the research question you are investigating. One cannot know with uncertainty given the old adage about this.