0

From a fitted lmer model. Note: not transformation of the predictors was done.

lmer.model=lmer(share ~ gender+ age_group + overall_photo_share_freq_group+
 affiliative_score_group*valence_group*condition+
 self_enhancing_score_group*valence_group*condition+
 self_defeating_score_group*valence_group*condition+
 aggressive_score_group*valence_group*condition+ 
 (1|pid), data = picshare_df, REML = FALSE)

I extracted the means:

lsmeans(lmer1.model, ~condition*valence_group*self_defeating_score_group, at=c(valence_group="very_positive", self_defeating_score_group="High"),options = list(type = "response"))
condition valence_group self_defeating_score_group lsmean     
baseline    very_positive        High               -0.32
perspective_taking  very_positive High               0.061
privacy_perspective very_positive High              -0.2382

When I plot interactions using cat_plot from interactions package I get the folioing graph.

cat_plot(model=lmer1.model, pred= condition, modx =self_defeating_score_group, mod2 = valence_group, plot.points = FALSE, geom = "line", line.thickness=2,pred.point.size=6, interval = FALSE, vary.lty=TRUE, modx.values = c("High"), mod2.values = c("very_positive"))

The lsmeans have highest value for `perspective_taking' condition. But in the interaction plots, this configuration has the lowest value.

enter image description here Does the interaction plot shows something different than the group/cell means?

Rakib
  • 7,435
  • 7
  • 29
  • 45
  • I note in the `lsmeans` call, you specify `type = "response"` (which suggests that your model has a response transformation), but there is no equivalent specification that I see in the comparison plot. Note that the middle value there is negative. You have said nothing about the model you fitted, but perhaps it's just that the results were not back-transformed. – Russ Lenth Feb 13 '20 at 03:52
  • @RussLenth, thanks for your comment. I do not know what `type="response"` does, but I guess it is about transforming the means in the original unit (Ques: how to stop that?). In the updated question, I did not perform any transformation on the predictors, and I copied the model definition in the question. – Rakib Feb 13 '20 at 21:44
  • I think your confusion has more to do with what I commented in your other posting. – Russ Lenth Feb 13 '20 at 22:44
  • @RussLenth, your suggestion to use `emmip` for plotting was very helpful. Indeed, the plotted points matched with output of `emmeans(..)`. But I do not think `cat_plot` cannot extract the correct values, what else might I have done wrong? I will do some more experimentations and try to make my questions more complete. – Rakib Feb 13 '20 at 23:43
  • I have no idea what cat_plot() does. But what you see in emmip() are the predictions from the model. I guess if you want to use cat_plot anyway, you better dig through the documentation and perhaps ask the developer to explain what it does. – Russ Lenth Feb 14 '20 at 00:14

0 Answers0