<p>Through continued research I stumbled across the <code>rosetta</code> package, which contains the function <code>gemm()</code>, which can create this model with the following code:</p>
<pre><code>result &lt;- gemm(data = mydata,
xvar = &quot;Bullying_c&quot;,
mvar = &quot;SelfEsteem_c&quot;,
yvar = &quot;Dissatisfaction&quot;,
xmmod = &quot;YearLevel&quot;,
nboot = 5000)

print(result)
</code></pre>
<p>This function also allows for covariates. The <code>gemm()</code> function is clearly explained on the following pages:</p>
<p>Details about the function:<br />
<a href="https://rdrr.io/github/psytext/rosetta/man/gemm.html" rel="nofollow noreferrer">https://rdrr.io/github/psytext/rosetta/man/gemm.html</a></p>
<p>Link to PDF download for a tutorial running these analysis and interpreting results:
<a href="https://psyarxiv.com/mj2ug/download" rel="nofollow noreferrer">https://psyarxiv.com/mj2ug/download</a></p>
Running a Moderated Mediation analysis with Ordinal ModV in R
<p>I have data collected from a survey that i want to build a moderated mediation model with. My four variables are:</p>
<ul>
<li><code>Bullying</code> = Continuous, average response to several Likert Scale Questions from an individual, range 1-5 (IV)</li>
<li><code>Self-Esteem</code> = Continuous, calculated as above (Mediator)</li>
<li><code>Dissatisfaction</code> = Continuous, calculated as above (DV)</li>
<li><code>Year Level</code> = Discrete Ordinal, range from 1-10 (Moderator)</li>
</ul>
<p>I have already calculated and found that <code>Self-Esteem</code> is a simple Mediator of the effect <code>Bullying -&gt; Dissatisfaction</code>. I now want to see if <code>Year level</code> is a Moderator of this Mediation model, however the only guides I can find rely on splitting the Moderator into two dichotomous groups, which I don't want to do. I think I have found that <code>Year Level</code> is not a simple moderator for the <code>Bullying -&gt; Dissatisfaction</code> effect through the code:</p>
<pre><code>Bullying_c &lt;- c(scale(Bullying, center = TRUE, scale = FALSE))
SelfEsteem_c &lt;- c(scale(SelfEsteem, center = TRUE, scale = FALSE))

fitMod &lt;- lm(Dissatisfaction ~ Bullying_c + SelfEsteem_c + Bullying_c*SelfEsteem_c)
fitModB &lt;- Boot(fitMod, R = 1000)
summary (fitModB)
</code></pre>
<p>Which outputs:</p>
<pre><code>Residuals:
    Min      1Q  Median      3Q     Max 
-1.5143 -0.6560 -0.2014  0.5426  3.0809 

Coefficients: 
                         Estimate Std. Error t value Pr(&gt;|t|)    
(Intercept)              1.853848   0.032137  57.686  &lt; 2e-16 ***
Bullying_c               0.203157   0.027922   7.276  8.5e-13 ***
SelfEsteem_c             -0.036391   0.015824  -2.300   0.0217 *  
Bullying_c:SelfEsteem_c   0.007795   0.012430   0.627   0.5308  
</code></pre>
<p>Which shows that <code>Self-esteem</code> is not an overall moderator, hence I'm looking at Moderated Mediation, not Mediated Moderation.</p>
<p>I've tried looking up the packages: <code>psych</code> , <code>mediation</code>, and <code>lavaan</code>, but I've been unable to find a way to run the analysis with an ordinal Moderator. Most guides want me to choose two values of the moderator, but I want to include all 10 classes.</p>