title: Getting interaction contrasts from lmer in R from 3-way interaction with continuous variables
body: <p>I ran a linear mixed-effects model looking at the effect of Stress and Lifestyle (HLI) on cognitive change over Time using the <code>lme4</code> package in R...</p>
  <pre><code>mod &lt;- lmer(3MS ~ age + sex + edu + Stress*Time*HLI + (1|ID), data=dflong, na.action = na.omit)
  </code></pre>
  <p>I'm most interested in decomposing the 3-way interaction between <code>Stress*Lifestyle*Time</code>. Specifically, I want to get the interaction contrasts to look at the conditional effects of <code>Stress*Time</code> at -1SD, mean, and +1SD of <code>HLI</code>. To do this, I am using the interactions package to decompose the interaction...</p>
  <pre><code>sim_slopes(
    model=mod,
    pred=Stress*Time,
    modx=HLI,
    data = dflong)
  </code></pre>
  <p>But I'm receiving the following error</p>
  <pre><code>Error in as(x, &quot;matrix&quot;)[i = i, j = j, drop = drop] : 
    subscript out of bounds
  In addition: Warning message:
  Stress * Time and HLI are not included in an interaction with one another in
  the model. 
  </code></pre>
  <p>I'm not sure why I'm getting this error or how to go about fixing it? Or if there's another package that can do what I need in a better way? I'm not familiar with any though.</p>
  <p>Thanks so much in advance!!</p>