Load Data

# Study 2
load("Study2.RData")

Descriptives

#TEST ASSUMPTIONS
mardiaSkew(df[, c("AMBDIS", "DSEMGMT", "M1", "M2", "Y1", "Y2")])
##     b1d     chi      df       p 
##   3.190 127.591  56.000   0.000
mardiaKurtosis(df[, c("AMBDIS", "DSEMGMT", "M1", "M2", "Y1", "Y2")])
##    b2d      z      p 
## 48.418  0.330  0.741
describe(df[, c("AMBDIS", "DSEMGMT", "M1", "M2", "Y1", "Y2")])
##         vars   n mean   sd median trimmed  mad  min max range  skew kurtosis
## AMBDIS     1 240 2.26 0.78   2.00    2.19 0.74 1.25 5.0  3.75  0.77     0.32
## DSEMGMT    2 240 3.57 1.00   3.75    3.63 1.11 1.00 5.0  4.00 -0.48    -0.54
## M1         3 240 2.64 1.13   2.75    2.61 1.48 1.00 5.0  4.00  0.09    -1.09
## M2         4 240 3.27 1.04   3.50    3.33 0.74 1.00 5.0  4.00 -0.55    -0.48
## Y1         5 240 2.32 0.84   2.20    2.29 0.89 1.00 4.4  3.40  0.21    -0.73
## Y2         6 240 2.67 1.05   2.67    2.66 1.24 1.00 5.0  4.00  0.08    -0.88
##           se
## AMBDIS  0.05
## DSEMGMT 0.06
## M1      0.07
## M2      0.07
## Y1      0.05
## Y2      0.07

Correlation Table

corr_df <- df[c("AMBDIS", "DSEMGMT", "M1", "M2", "Y1", "Y2")]

apa.cor.table(data = corr_df,
              filename = "Study2Correlation.doc",
              table.number = 3)
## 
## 
## Table 3 
## 
## Means, standard deviations, and correlations with confidence intervals
##  
## 
##   Variable   M    SD   1           2            3          4          
##   1. AMBDIS  2.26 0.78                                                
##                                                                       
##   2. DSEMGMT 3.57 1.00 .05                                            
##                        [-.08, .18]                                    
##                                                                       
##   3. M1      2.64 1.13 .36**       .15*                               
##                        [.25, .47]  [.02, .27]                         
##                                                                       
##   4. M2      3.27 1.04 .26**       .36**        .31**                 
##                        [.14, .38]  [.25, .47]   [.19, .42]            
##                                                                       
##   5. Y1      2.31 0.84 .17**       -.20**       .27**      -.06       
##                        [.04, .29]  [-.32, -.08] [.15, .39] [-.18, .07]
##                                                                       
##   6. Y2      2.67 1.05 .29**       .45**        .34**      .39**      
##                        [.17, .40]  [.35, .55]   [.22, .45] [.28, .50] 
##                                                                       
##   5          
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##              
##   -.07       
##   [-.19, .06]
##              
## 
## Note. M and SD are used to represent mean and standard deviation, respectively.
## Values in square brackets indicate the 95% confidence interval.
## The confidence interval is a plausible range of population correlations 
## that could have caused the sample correlation (Cumming, 2014).
##  * indicates p < .05. ** indicates p < .01.
## 

Sex, Race, Age, and Education

## # A tibble: 3 × 2
##   sex             n
##   <dbl+lbl>   <int>
## 1  1 [Male]     114
## 2  2 [Female]    46
## 3 NA             80
## # A tibble: 3 × 2
##   SexOrnt                           n
##   <dbl+lbl>                     <int>
## 1 11 [Heterosexual or straight]   206
## 2 12 [Gay or lesbian]              11
## 3 13 [Bisexual]                    23
## # A tibble: 6 × 2
##   Race                                       n
##   <dbl+lbl>                              <int>
## 1 1 [White]                                151
## 2 2 [Black or African American]             50
## 3 3 [Hispanic/Latinx]                       12
## 4 4 [Native American or Alaska Native]       2
## 5 5 [Asian]                                 21
## 6 7 [Two or More Races (please specify)]     4
## # A tibble: 7 × 2
##   Education                                                                    n
##   <dbl+lbl>                                                                <int>
## 1 2 [High school graduate (high school diploma or equivalent including GE…    16
## 2 3 [Some college but no degree]                                              32
## 3 4 [Associate degree in college (2-year)]                                    20
## 4 5 [Bachelor's degree in college (4-year)]                                  124
## 5 6 [Master's degree]                                                         36
## 6 7 [Doctoral degree]                                                          6
## 7 8 [Professional degree (JD, MD)]                                             6
## 
##      1      2 
## 0.7125 0.2875
## 
##         11         12         13 
## 0.85833333 0.04583333 0.09583333
## 
##           1           2           3           4           5           7 
## 0.629166667 0.208333333 0.050000000 0.008333333 0.087500000 0.016666667
## 
##          2          3          4          5          6          7          8 
## 0.06666667 0.13333333 0.08333333 0.51666667 0.15000000 0.02500000 0.02500000
## [1] 37.79167
## [1] 9.34454

Tenure

## [1] 7.141667
## [1] 6.037757

Reliabilities (Cronbach’s alphas)

##    Scale Raw_Alpha
## 1 amdisr      0.86
## 2 hinapr      0.89
## 3 chaapr      0.90
## 4 scwthr      0.84
## 5    dvr      0.94
## 6  dmser      0.91

Mediation Model

model <- '
  M1 ~ a1*X
  M2 ~ a2*X
  
  Y1 ~ X + b11*M1 + b21*M2
  Y2 ~ X + b12*M1 + b22*M2
'

fit_Study2 <- sem(model, 
               data = df, 
               estimator = "MLR",          
               se = "robust",               
               missing = "fiml") 

summary(fit_Study2, 
        standardized = TRUE,    
        rsquare = TRUE) 
## lavaan 0.7-3 ended normally after 9 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        17
## 
##   Number of observations                           240
##   Number of missing patterns                         1
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                                13.520      11.471
##   Degrees of freedom                                 1           1
##   P-value (Chi-square)                           0.000       0.001
##   Scaling correction factor                                  1.179
##     Yuan-Bentler correction (Mplus variant)                       
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   M1 ~                                                                  
##     X         (a1)    0.527    0.090    5.883    0.000    0.527    0.364
##   M2 ~                                                                  
##     X         (a2)    0.352    0.077    4.588    0.000    0.352    0.265
##   Y1 ~                                                                  
##     X                 0.120    0.077    1.543    0.123    0.120    0.110
##     M1       (b11)    0.214    0.055    3.891    0.000    0.214    0.284
##     M2       (b21)   -0.140    0.055   -2.551    0.011   -0.140   -0.172
##   Y2 ~                                                                  
##     X                 0.190    0.081    2.337    0.019    0.190    0.143
##     M1       (b12)    0.181    0.064    2.826    0.005    0.181    0.198
##     M2       (b22)    0.299    0.067    4.468    0.000    0.299    0.301
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .Y1 ~~                                                                 
##    .Y2               -0.113    0.049   -2.319    0.020   -0.113   -0.156
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                2.640    0.068   39.002    0.000    2.640    2.345
##    .M2                3.268    0.064   50.692    0.000    3.268    3.156
##    .Y1                2.210    0.208   10.625    0.000    2.210    2.610
##    .Y2                1.212    0.246    4.930    0.000    1.212    1.177
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                1.099    0.083   13.224    0.000    1.099    0.867
##    .M2                0.997    0.080   12.542    0.000    0.997    0.930
##    .Y1                0.627    0.049   12.703    0.000    0.627    0.874
##    .Y2                0.843    0.069   12.287    0.000    0.843    0.795
## 
## R-Square:
##                    Estimate
##     M1                0.133
##     M2                0.070
##     Y1                0.126
##     Y2                0.205

Indirect Effect: Ambient Discrimination → Threat Appraisal → Social Withdrawal

# Study 2
estimates <- parameterEstimates(fit_Study2, ci = TRUE, boot.ci.type = "bca.simple")

a_path <- estimates[estimates$label == "a1", "est"]
a_path_se <- estimates[estimates$label == "a1", "se"]

b_path <- estimates[estimates$label == "b11", "est"]
b_path_se <- estimates[estimates$label == "b11", "se"]

# Compute Monte Carlo confidence interval
mc_ci <- medci(mu.x = a_path, mu.y = b_path, se.x = a_path_se, se.y = b_path_se,
               rho = 0, alpha = .05, sims = 10000, method = "parametric")

cat("indirect effect (Study 2):", a_path * b_path, "\n")
## indirect effect (Study 2): 0.1126643
cat("Monte Carlo 95% CI (Study 2): [", mc_ci$`95% CI`[1], ",", mc_ci$`95% CI`[2], "]\n")
## Monte Carlo 95% CI (Study 2): [ 0.05051393 , 0.1875219 ]

Indirect Effect: Ambient Discrimination → Challenge Appraisal → Diversity Voice

# Study 2
estimates <- parameterEstimates(fit_Study2, ci = TRUE, boot.ci.type = "bca.simple")

a_path <- estimates[estimates$label == "a2", "est"]
a_path_se <- estimates[estimates$label == "a2", "se"]

b_path <- estimates[estimates$label == "b22", "est"]
b_path_se <- estimates[estimates$label == "b22", "se"]

# Compute Monte Carlo confidence interval
mc_ci <- medci(mu.x = a_path, mu.y = b_path, se.x = a_path_se, se.y = b_path_se,
               rho = 0, alpha = .05, sims = 10000, method = "parametric")

cat("indirect effect (Study 2):", a_path * b_path, "\n")
## indirect effect (Study 2): 0.1054376
cat("Monte Carlo 95% CI (Study 2): [", mc_ci$`95% CI`[1], ",", mc_ci$`95% CI`[2], "]\n")
## Monte Carlo 95% CI (Study 2): [ 0.04762055 , 0.1775846 ]

Moderated Mediation Model

model <- '
  M1 ~ a1*X + a1w*XW + d1*W
  M2 ~ a2*X + a2w*XW + d2*W
  
  Y1 ~ X + W + b11*M1 + b21*M2
  Y2 ~ X + W + b12*M1 + b22*M2


# Low/High Ambient Discrimination
  LowAmbdis := -.78
  HighAmbdis := .78
  
# Low/High Diversity Management Efficacy
  LowEfficacy := -1
  HighEfficacy := 1
  
# Simple Slopes for Low/High Diversity Management Self-Efficacy
  SS_LowEfficacy_challenge := a2 + a2w*LowEfficacy
  SS_HighEfficacy_challenge := a2 + a2w*HighEfficacy

# Compute predicted values for plotting at Low/High values of X and W (M2 intercept = 3.261)
  LowEfficacy_LowAmbdis := (a2 + a2w*LowEfficacy)*LowAmbdis + (3.261 + d2*LowEfficacy) 
  LowEfficacy_HighAmbdis := (a2 + a2w*LowEfficacy)*HighAmbdis + (3.261 + d2*LowEfficacy) 
  HighEfficacy_LowAmbdis := (a2 + a2w*HighEfficacy)*LowAmbdis + (3.261 + d2*HighEfficacy) 
  HighEfficacy_HighAmbdis := (a2 + a2w*HighEfficacy)*HighAmbdis + (3.261 + d2*HighEfficacy)

'

results <- sem(model, 
               data = df, 
               estimator = "MLR",          
               se = "robust",               
               missing = "fiml")

summary(results, standardized = TRUE, rsquare = TRUE)
## lavaan 0.7-3 ended normally after 6 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        23
## 
##   Number of observations                           240
##   Number of missing patterns                         1
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                                10.214      10.975
##   Degrees of freedom                                 3           3
##   P-value (Chi-square)                           0.017       0.012
##   Scaling correction factor                                  0.931
##     Yuan-Bentler correction (Mplus variant)                       
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   M1 ~                                                                  
##     X         (a1)    0.523    0.092    5.712    0.000    0.523    0.361
##     XW       (a1w)   -0.031    0.080   -0.390    0.697   -0.031   -0.021
##     W         (d1)    0.148    0.067    2.219    0.026    0.148    0.131
##   M2 ~                                                                  
##     X         (a2)    0.298    0.075    3.991    0.000    0.298    0.224
##     XW       (a2w)    0.178    0.087    2.048    0.041    0.178    0.130
##     W         (d2)    0.372    0.067    5.591    0.000    0.372    0.358
##   Y1 ~                                                                  
##     X                 0.103    0.075    1.374    0.169    0.103    0.095
##     W                -0.184    0.052   -3.561    0.000   -0.184   -0.218
##     M1       (b11)    0.224    0.053    4.215    0.000    0.224    0.300
##     M2       (b21)   -0.076    0.055   -1.388    0.165   -0.076   -0.093
##   Y2 ~                                                                  
##     X                 0.223    0.077    2.905    0.004    0.223    0.167
##     W                 0.375    0.066    5.712    0.000    0.375    0.360
##     M1       (b12)    0.160    0.059    2.713    0.007    0.160    0.174
##     M2       (b22)    0.168    0.065    2.587    0.010    0.168    0.168
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .Y1 ~~                                                                 
##    .Y2               -0.054    0.047   -1.166    0.244   -0.054   -0.083
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                2.641    0.067   39.275    0.000    2.641    2.346
##    .M2                3.261    0.060   54.733    0.000    3.261    3.149
##    .Y1                1.972    0.217    9.092    0.000    1.972    2.342
##    .Y2                1.697    0.248    6.843    0.000    1.697    1.635
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                1.077    0.085   12.702    0.000    1.077    0.849
##    .M2                0.847    0.076   11.102    0.000    0.847    0.790
##    .Y1                0.598    0.050   12.069    0.000    0.598    0.843
##    .Y2                0.723    0.061   11.856    0.000    0.723    0.671
## 
## R-Square:
##                    Estimate
##     M1                0.151
##     M2                0.210
##     Y1                0.157
##     Y2                0.329
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     LowAmbdis        -0.780                              -0.780   -0.780
##     HighAmbdis        0.780                               0.780    0.780
##     LowEfficacy      -1.000                              -1.000   -1.000
##     HighEfficacy      1.000                               1.000    1.000
##     SS_LwEffccy_ch    0.120    0.124    0.972    0.331    0.120    0.094
##     SS_HghEffccy_c    0.476    0.105    4.549    0.000    0.476    0.354
##     LwEffccy_LwAmb    2.795    0.129   21.652    0.000    2.795    2.829
##     LwEffccy_HghAm    2.983    0.104   28.617    0.000    2.983    2.977
##     HghEffccy_LwAm    3.262    0.122   26.754    0.000    3.262    3.343
##     HghEffccy_HghA    4.005    0.086   46.708    0.000    4.005    3.895
# CONDITIONAL INDIRECT EFFECTS
estimates <- parameterEstimates(results)

# A-path
a1 <- estimates[estimates$label == "a2", "est"]
a3 <- estimates[estimates$label == "a2w", "est"]
a1_se <- estimates[estimates$label == "a2", "se"]
a3_se <- estimates[estimates$label == "a2w", "se"]

# Conditional a-paths
a_low <- estimates[estimates$label == "SS_LowEfficacy_challenge", "est"]
a_high <- estimates[estimates$label == "SS_HighEfficacy_challenge", "est"]

# SE for conditional a-paths
a_low_se <- estimates[estimates$label == "SS_LowEfficacy_challenge", "se"]
a_high_se <- estimates[estimates$label == "SS_HighEfficacy_challenge", "se"]

# B-path
b1 <- estimates[estimates$label == "b11", "est"]
b1_se <- estimates[estimates$label == "b11", "se"]
# Compute Monte Carlo CI for Low Diversity Management Self-Efficacy
mc_ci_low <- medci(mu.x = a_low, mu.y = b1,
                   se.x = a_low_se, se.y = b1_se,
                   rho = 0, alpha = .05, sims = 10000)

# Compute Monte Carlo CI for High Diversity Management Self-Efficacy
mc_ci_high <- medci(mu.x = a_high, mu.y = b1,
                    se.x = a_high_se, se.y = b1_se,
                    rho = 0, alpha = .05, sims = 10000)

# Conditional ab
cat("Indirect Effect for Low Diversity Management Self-Efficacy:", a_low * b1, "\n")
## Indirect Effect for Low Diversity Management Self-Efficacy: 0.02696978
cat("Monte Carlo 95% CI (Low Diversity Management Self-Efficacy):  [", round(mc_ci_low$`95% CI`, 3), "]\n\n")
## Monte Carlo 95% CI (Low Diversity Management Self-Efficacy):  [ -0.027 0.089 ]
cat("Indirect Effect for High Diversity Management Self-Efficacy:", a_high * b1, "\n")
## Indirect Effect for High Diversity Management Self-Efficacy: 0.1067388
cat("Monte Carlo 95% CI (High Diversity Management Self-Efficacy): [", round(mc_ci_high$`95% CI`, 3), "]\n")
## Monte Carlo 95% CI (High Diversity Management Self-Efficacy): [ 0.046 0.183 ]
# Figure: Study 2 Moderating Effect of Challenge Appraisal 

# Extract parameter estimates
estimates <- parameterEstimates(results)

int_M2 <- estimates$est[estimates$lhs == "M2" & 
                        estimates$op  == "~1"]

# Define moderator levels (efficacy) and predictor levels (X)
LowEfficacy  <- 0 - sd(df$W, na.rm = TRUE)
HighEfficacy <- 0 + sd(df$W, na.rm = TRUE)

X_LOW  <- -sd(df$X)   
X_HIGH <-  sd(df$X)

#Challenge appraisal 
# Coefficients
a2  <- estimates$est[estimates$label == "a2"]   # X → M2
a2w <- estimates$est[estimates$label == "a2w"]  # XW → M2
d2  <- estimates$est[estimates$label == "d2"]   # W → M2

# Low efficacy
LOWEFF_LOWX  <- int_M2 + a2*X_LOW  + a2w*(X_LOW  * LowEfficacy) + d2*LowEfficacy
LOWEFF_HIGHX <- int_M2 + a2*X_HIGH + a2w*(X_HIGH * LowEfficacy) + d2*LowEfficacy

# High efficacy
HIGHEFF_LOWX  <- int_M2 + a2*X_LOW  + a2w*(X_LOW  * HighEfficacy) + d2*HighEfficacy
HIGHEFF_HIGHX <- int_M2 + a2*X_HIGH + a2w*(X_HIGH * HighEfficacy) + d2*HighEfficacy

# Data frame for plotting the interaction
plot_data <- data.frame(
  Efficacy = rep(c("Low efficacy", "High efficacy"), each = 2),
  X_Level  = rep(c("Low", "High"), times = 2),
  Predicted_M2 = c(
    LOWEFF_LOWX, LOWEFF_HIGHX,
    HIGHEFF_LOWX, HIGHEFF_HIGHX
  )
)

plot_data$X_Level  <- factor(plot_data$X_Level, levels = c("Low", "High"))
plot_data$Efficacy <- factor(plot_data$Efficacy, levels = c("Low efficacy", "High efficacy"))

# Plot interaction 
ggplot(plot_data, aes(x = X_Level, y = Predicted_M2,
                      group = Efficacy, color = Efficacy)) +
  geom_line(linewidth = 1.2) +
  geom_point(size = 3) +
  scale_color_manual(
    values = c(
      "Low efficacy" = "grey50",
      "High efficacy" = "black"
    )
  ) +
  labs(
    x = "Ambient Racial Discrimination",
    y = "Challenge Appraisal",
    color = "Intergroup Management Self-Efficacy"
  ) +
  theme_classic(base_size = 14) +
  theme(
    legend.position = "right",
    axis.line = element_line(color = "black", linewidth = 0.6),
    axis.ticks = element_line(color = "black"),
    axis.title = element_text(size = 12),
    axis.text = element_text(size = 12),
    legend.title = element_text(size = 12),
    legend.text = element_text(size = 12),
  ) + scale_y_continuous(
  breaks = 1:5
) +
coord_cartesian(ylim = c(1, 5))

Exploratory Second-Stage Moderation

df$M1_c <- df$M1 - mean(df$M1, na.rm = TRUE)
mean(df$M1_c, na.rm = TRUE)
## [1] -1.757853e-17
df$M2_c <- df$M2 - mean(df$M2, na.rm = TRUE)
mean(df$M2_c, na.rm = TRUE)
## [1] 1.808738e-16
df$XW1 <- df$M1_c * df$W
df$XW2 <- df$M2_c * df$W

SUPPLEMENTARY - SECOND STAGE MODERATION

model <- '
  M1 ~ a1*X + W
  M2 ~ a2*X + W
  
  Y1 ~ d1*W + b1*M1 + M2 + b1w*XW1 + X
  Y2 ~ d2*W + M1 + b2*M2 + b2w*XW2 + X

  M1 ~~ M2
  Y1 ~~ Y2
  
# Low/High Diversity Management Efficacy
  LowEfficacy := -1
  HighEfficacy := 1
  
# Simple Slopes for Low/High Diversity Management Self-Efficacy
  SS_LowEfficacy_threat := b1 + b1w*LowEfficacy
  SS_HighEfficacy_threat := b1 + b1w*HighEfficacy
'

results <- sem(model, 
               data = df, 
               estimator = "MLR",          
               se = "robust",               
               missing = "fiml")

summary(results, standardized = TRUE, fit.measures = TRUE, rsquare = TRUE)
## lavaan 0.7-3 ended normally after 22 iterations
## 
##   Estimator                                         ML
##   Optimization method                           NLMINB
##   Number of model parameters                        24
## 
##   Number of observations                           240
##   Number of missing patterns                         1
## 
## Model Test User Model:
##                                               Standard      Scaled
##   Test Statistic                                 8.381       5.699
##   Degrees of freedom                                 6           6
##   P-value (Chi-square)                           0.212       0.458
##   Scaling correction factor                                  1.471
##     Yuan-Bentler correction (Mplus variant)                       
## 
## Model Test Baseline Model:
## 
##   Test statistic                               251.231     206.813
##   Degrees of freedom                                22          22
##   P-value                                        0.000       0.000
##   Scaling correction factor                                  1.215
## 
## User Model versus Baseline Model:
## 
##   Comparative Fit Index (CFI)                    0.990       1.000
##   Tucker-Lewis Index (TLI)                       0.962       1.006
##                                                                   
##   Robust Comparative Fit Index (CFI)                         1.000
##   Robust Tucker-Lewis Index (TLI)                            1.010
## 
## Loglikelihood and Information Criteria:
## 
##   Loglikelihood user model (H0)              -1245.220   -1245.220
##   Scaling correction factor                                  1.014
##       for the MLR correction                                      
##   Loglikelihood unrestricted model (H1)      -1241.030   -1241.030
##   Scaling correction factor                                  1.106
##       for the MLR correction                                      
##                                                                   
##   Akaike (AIC)                                2538.441    2538.441
##   Bayesian (BIC)                              2621.976    2621.976
##   Sample-size adjusted Bayesian (SABIC)       2545.902    2545.902
## 
## Root Mean Square Error of Approximation:
## 
##   RMSEA                                          0.041       0.000
##   90 Percent confidence interval - lower         0.000       0.000
##   90 Percent confidence interval - upper         0.099       0.071
##   P-value H_0: RMSEA <= 0.050                    0.530       0.822
##   P-value H_0: RMSEA >= 0.080                    0.159       0.023
##                                                                   
##   Robust RMSEA                                               0.000
##   90 Percent confidence interval - lower                     0.000
##   90 Percent confidence interval - upper                     0.099
##   P-value H_0: Robust RMSEA <= 0.050                         0.689
##   P-value H_0: Robust RMSEA >= 0.080                         0.121
## 
## Standardized Root Mean Square Residual:
## 
##   SRMR                                           0.026       0.026
## 
## Goodness of Fit Index:
## 
##   Goodness of Fit Index (GFI)                    0.998            
##   90 Percent confidence interval - lower         0.985            
##   90 Percent confidence interval - upper         1.000            
##                                                                   
##   Robust GFI                                                 1.000
##   90 Percent confidence interval - lower                     0.986
##   90 Percent confidence interval - upper                     1.000
## 
## Parameter Estimates:
## 
##   Standard errors                             Sandwich
##   Information bread                           Observed
##   Observed information based on                Hessian
## 
## Regressions:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##   M1 ~                                                                  
##     X         (a1)    0.518    0.090    5.779    0.000    0.518    0.358
##     W                 0.149    0.067    2.230    0.026    0.149    0.132
##   M2 ~                                                                  
##     X         (a2)    0.329    0.073    4.525    0.000    0.329    0.247
##     W                 0.366    0.072    5.115    0.000    0.366    0.352
##   Y1 ~                                                                  
##     W         (d1)   -0.210    0.053   -3.972    0.000   -0.210   -0.249
##     M1        (b1)    0.228    0.051    4.451    0.000    0.228    0.306
##     M2               -0.059    0.054   -1.081    0.280   -0.059   -0.073
##     XW1      (b1w)   -0.089    0.039   -2.266    0.023   -0.089   -0.123
##     X                 0.101    0.074    1.364    0.172    0.101    0.094
##   Y2 ~                                                                  
##     W         (d2)    0.372    0.067    5.586    0.000    0.372    0.355
##     M1                0.161    0.059    2.726    0.006    0.161    0.174
##     M2        (b2)    0.168    0.065    2.570    0.010    0.168    0.167
##     XW2      (b2w)   -0.020    0.050   -0.403    0.687   -0.020   -0.022
##     X                 0.227    0.078    2.928    0.003    0.227    0.169
## 
## Covariances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##  .M1 ~~                                                                 
##    .M2                0.191    0.063    3.010    0.003    0.191    0.198
##  .Y1 ~~                                                                 
##    .Y2               -0.056    0.046   -1.220    0.222   -0.056   -0.086
## 
## Intercepts:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                2.640    0.067   39.398    0.000    2.640    2.345
##    .M2                3.268    0.060   54.443    0.000    3.268    3.156
##    .Y1                1.921    0.209    9.188    0.000    1.921    2.290
##    .Y2                1.702    0.251    6.768    0.000    1.702    1.631
## 
## Variances:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##    .M1                1.077    0.084   12.790    0.000    1.077    0.850
##    .M2                0.865    0.082   10.526    0.000    0.865    0.806
##    .Y1                0.588    0.049   12.050    0.000    0.588    0.835
##    .Y2                0.722    0.061   11.841    0.000    0.722    0.664
## 
## R-Square:
##                    Estimate
##     M1                0.150
##     M2                0.194
##     Y1                0.165
##     Y2                0.336
## 
## Defined Parameters:
##                    Estimate  Std.Err  z-value  P(>|z|)   Std.lv  Std.all
##     LowEfficacy      -1.000                              -1.000   -1.000
##     HighEfficacy      1.000                               1.000    1.000
##     SS_LwEffccy_th    0.317    0.062    5.150    0.000    0.317    0.428
##     SS_HghEffccy_t    0.139    0.067    2.056    0.040    0.139    0.183
# CONDITIONAL INDIRECT EFFECTS
estimates <- parameterEstimates(results)

# B-path
b1 <- estimates[estimates$label == "b1", "est"]
b3 <- estimates[estimates$label == "b1w", "est"]
b1_se <- estimates[estimates$label == "b1", "se"]
b3_se <- estimates[estimates$label == "b1w", "se"]

# Conditional b-paths
b_low <- estimates[estimates$label == "SS_LowEfficacy_threat", "est"]
b_high <- estimates[estimates$label == "SS_HighEfficacy_threat", "est"]

# SE for conditional a-paths
b_low_se <- estimates[estimates$label == "SS_LowEfficacy_threat", "se"]
b_high_se <- estimates[estimates$label == "SS_HighEfficacy_threat", "se"]

# A-path
a1 <- estimates[estimates$label == "a1", "est"]
a1_se <- estimates[estimates$label == "a1", "se"]
# Compute Monte Carlo CI for Low Diversity Management Self-Efficacy
mc_ci_low <- medci(mu.x = a1, mu.y = b_low,
                   se.x = a1_se, se.y = b_low_se,
                   rho = 0, alpha = .05, sims = 10000)

# Compute Monte Carlo CI for High Diversity Management Self-Efficacy
mc_ci_high <- medci(mu.x = a1, mu.y = b_high,
                    se.x = a1_se, se.y = b_high_se,
                    rho = 0, alpha = .05, sims = 10000)

# Conditional ab
cat("Indirect Effect for Low Diversity Management Self-Efficacy:", a1 * b_low, "\n")
## Indirect Effect for Low Diversity Management Self-Efficacy: 0.1641423
cat("Monte Carlo 95% CI (Low Diversity Management Self-Efficacy):  [", round(mc_ci_low$`95% CI`, 3), "]\n\n")
## Monte Carlo 95% CI (Low Diversity Management Self-Efficacy):  [ 0.088 0.256 ]
cat("Indirect Effect for High Diversity Management Self-Efficacy:", a1 * b_high, "\n")
## Indirect Effect for High Diversity Management Self-Efficacy: 0.0717987
cat("Monte Carlo 95% CI (High Diversity Management Self-Efficacy): [", round(mc_ci_high$`95% CI`, 3), "]\n")
## Monte Carlo 95% CI (High Diversity Management Self-Efficacy): [ 0.003 0.151 ]