This example from Roczniewska & Higgins (2019) is an instance of moderated mediation model with two postulated mediators. While such models can be fitted with the PROCESS macros (Hayes, 2022), we illustrate below the postulated causal diagram, the nonparametric bootstrap. We pay particular attention to verification of the linear model assumptions.

The context of the research is a natural experiment (or quasi-experiment): the authors study changes in behaviour due to modifications in the schooling system.

The statistical model in Roczniewska & Higgins (2019) can be implicitly deduced from Table 2: the manipulated variable is the message framing and there are three postulated mediators (message fluency, message engagement, process fairness), the latter of which interacts or moderate with the change in outcome, and two moderators assumed to impact both mediators through linear interactions, termed promotion focus and prevention focus.

The mean response from the linear models are

\[ \begin{align} \mathsf{E}(\texttt{PF}) &= \alpha_0 + \alpha_1 \texttt{Fram} + \alpha_2\texttt{Prom} + \alpha_3 \texttt{Prev}\\&\quad + \alpha_4 \texttt{Fram}\times\texttt{Prom} + \alpha_5 \texttt{Fram}\times\texttt{Prev} \end{align} \tag{1}\]

\[ \begin{align} \mathsf{E}(\texttt{ME}) &= \beta_0 + \beta_1 \texttt{Fram} + \beta_2\texttt{Prom} + \beta_3 \texttt{Prev}\\&\quad + \beta_4 \texttt{Fram}\times\texttt{Prom} + \beta_5 \texttt{Fram}\times\texttt{Prev} \end{align} \tag{2}\]

\[ \begin{align} \mathsf{E}(\texttt{MF}) &= \alpha_0 + \alpha_1 \texttt{Fram} + \alpha_2\texttt{Prom} + \alpha_3 \texttt{Prev}\\&\quad + \alpha_4 \texttt{Fram}\times\texttt{Prom} + \alpha_5 \texttt{Fram}\times\texttt{Prev} \end{align} \tag{3}\]

\[ \begin{align} \mathsf{E}(\texttt{Open}) &= \gamma_0 + \gamma_1 \texttt{Fram} + \gamma_2\texttt{Prom} + \gamma_3 \texttt{Prev}\\&\quad + \gamma_4 \texttt{Fram}\times\texttt{Prom} + \gamma_5 \texttt{Fram}\times\texttt{Prev} \\& +\gamma_6 \texttt{PF} + \gamma_7\texttt{ME} + \gamma_8 \texttt{MF} + \gamma_9\texttt{CO} \\&\quad+ \gamma_{10} \texttt{ME} \times \texttt{CO} + + \gamma_{11} \texttt{PF} \times \texttt{CO} + + \gamma_{12} \texttt{MF} \times \texttt{CO} \end{align} \tag{4}\]

yielding a total of 31 coefficients for \(n=198\) observations.

Code
data(RH19_S1, package = "hecedsm")
set.seed(80667)
joint_reg <- function(data, indices = 1:nrow(data)){
  mod1 <- lm(fairness ~ 
               regfocus * (promem + prevem), 
             data = data[indices,])
  mod2 <- lm(engagement ~ 
               regfocus * (promem + prevem), 
             data = data[indices,])
  mod3 <- lm(fluency ~ 
               regfocus * (promem + prevem), 
             data = data[indices,])
  resp <- lm(dopenness ~
               regfocus * (promem + prevem) +
               (fairness + fluency + 
       engagement) * change,
             data = data[indices,])
  coefs <- c(coef(mod1), 
             coef(mod2), 
             coef(mod3), 
             coef(resp))
  return(coefs)
}
npboot <- boot::boot(
  data = RH19_S1, 
  statistic = joint_reg,
  R = 9999, # number of bootstrap replicates
  sim = "ordinary")
results <- rbind(
  npboot$t0, 
  apply(npboot$t, 2, 
        quantile, c(0.025, 0.975)))
Code
testImplications <- function( covariance.matrix, sample.size ){
    library(ggm)
    tst <- function(i){ pcor.test( pcor(i,covariance.matrix), length(i)-2, sample.size )$pvalue }
tos <- function(i){ paste(i,collapse=" ") }
implications <- list(c("M1","M2","V1","V2","X"),
        c("M1","M3","V1","V2","X"),
        c("M1","W"),
        c("M2","M3","V1","V2","X"),
        c("M2","W"),
        c("M3","W"),
        c("V1","V2"),
        c("V1","W"),
        c("V1","X"),
        c("V2","W"),
        c("V2","X"),
        c("W","X"))
    data.frame( implication=unlist(lapply(implications,tos)),
        pvalue=unlist( lapply( implications, tst ) ) )

}

References

Hayes, A. F. (2022). Introduction to mediation, moderation, and conditional process analysis: A regression-based approach (3rd ed.). Guilford Press.
Roczniewska, M., & Higgins, E. T. (2019). Messaging organizational change: How regulatory fit relates to openness to change through fairness perceptions. Journal of Experimental Social Psychology, 85, 103882. https://doi.org/10.1016/j.jesp.2019.103882