Note: “focalman” and “focalwoman” indicate the which columns the focal man and focal woman are in.
Demographics
Raw
table(vig_raw1$part_gend)/nrow(vig_raw1); paste0("Mean: ", mean(vig_raw1$Age, na.rm = TRUE)); paste0("SD: ", sd(vig_raw1$Age, na.rm = TRUE))
##
## Female Male
## 0.60 0.38
## [1] "Mean: 36.0883233532934"
## [1] "SD: 10.959909834093"
Clean
Passed Manipulation Check
## manip_check_label
## cond_f 0 1
## dei_nobacklash 26 200
## control 7 213
## dei_backlash 29 192
(mccheck <- as.data.frame(with(vig_raw1, table(cond_f, manip_check_label))) %>%
pivot_wider(names_from = "manip_check_label", values_from = "Freq")%>%
rename("Fail" = 2, "Pass" = 3))
## [1] "Passed: 605"
## Nonsense
## 0 1
## 7 661
table(vig_clean1_wide$part_gend)/nrow(vig_clean1_wide); paste0("Mean: ", mean(vig_clean1_wide$Age, na.rm = TRUE)); paste0("SD: ", sd(vig_clean1_wide$Age, na.rm = TRUE))
##
## Female Male
## 0.60 0.39
## [1] "Mean: 36.2624584717608"
## [1] "SD: 10.9813433952543"
Items
Ranking
vig_measures %>% ungroup() %>% dplyr::summarize(mean = mean(rank_r, na.rm = TRUE), sd = sd(rank_r, na.rm = TRUE))
VQ
##
## Pearson's product-moment correlation
##
## data: vq_1 and vq_2
## t = 73, df = 2406, p-value <0.0000000000000002
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.82 0.84
## sample estimates:
## cor
## 0.83
VS
##
## Pearson's product-moment correlation
##
## data: vs_1 and vs_2
## t = 59, df = 2405, p-value <0.0000000000000002
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.75 0.78
## sample estimates:
## cor
## 0.77
Analyses
Ranking
Regression
## Call:
## clm2(location = rank_rf ~ cond_reg * gendertarget_f + (1 | person_num) +
## (1 | pid), data = v1clean)
##
## Location coefficients:
## Estimate Std. Error z value Pr(>|z|)
## cond_reg2.Backlash -0.623 0.128 -4.853 0.000001216511
## cond_reg3.NoBacklash -0.769 0.128 -6.008 0.000000001878
## gendertarget_fWoman trgt 0.250 0.125 2.003 0.045
## cond_reg2.Backlash:gendertarget_fWoman trgt 1.225 0.182 6.740 0.000000000016
## cond_reg3.NoBacklash:gendertarget_fWoman trgt 1.500 0.181 8.287 < 0.0000000000000002
##
## No scale coefficients
##
## Threshold coefficients:
## Estimate Std. Error z value
## 1|2 -1.095 0.094 -11.689
## 2|3 0.128 0.090 1.415
## 3|4 1.341 0.095 14.101
##
## log-likelihood: -3175.94
## AIC: 6367.88
## Condition number of Hessian: 117.06
## (8 observations deleted due to missingness)
Full posthoc tests
rankconfint <- data.frame(confint(emmeans(lmer(rank_r~cond_reg*gendertarget_f + (1|person_num) + (1|pid), data = v1clean), pairwise~cond_reg*gendertarget_f)$contrasts)) %>%
dplyr::select(contrast, lower.CL, upper.CL)
## boundary (singular) fit: see help('isSingular')
rankemmeans <- emmeans(lmer(rank_r~cond_reg*gendertarget_f + (1|person_num) + (1|pid), data = v1clean), pairwise~cond_reg*gendertarget_f)$contrasts %>% as.data.frame()
## boundary (singular) fit: see help('isSingular')
ranktukey <- left_join(
rankemmeans, rankconfint, by = "contrast"
)
ranktukey %>%
separate(contrast, into = c("Condition1", "Condition2"), sep = " - ", extra = "merge")%>%
separate(Condition1, into = c("DEICondition", "GenderTarget"), sep = " ", extra = "merge")%>%
separate(Condition2, into = c("DEICondition2", "GenderTarget2"), sep = " ", extra = "merge") %>%
dplyr::select(-c(t.ratio))
Estimated marginal means
Graph
Voice Solicitation
Regression
## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: vs ~ cond_reg * gendertarget_f + (1 | person) + (1 | pid)
## Data: v1clean
##
## REML criterion at convergence: 8717
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.293 -0.505 0.046 0.576 3.065
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 1.17912 1.0859
## person (Intercept) 0.00315 0.0562
## Residual 1.52931 1.2367
## Number of obs: 2408, groups: pid, 602; person, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.495 0.103 27.645 43.45 < 0.0000000000000002 ***
## cond_reg2.Backlash -0.290 0.139 910.097 -2.09 0.03715 *
## cond_reg3.NoBacklash -0.292 0.138 910.097 -2.12 0.03422 *
## gendertarget_fWoman trgt 0.362 0.102 6.582 3.56 0.01027 *
## cond_reg2.Backlash:gendertarget_fWoman trgt 0.412 0.123 1801.001 3.35 0.00083 ***
## cond_reg3.NoBacklash:gendertarget_fWoman trgt 0.617 0.122 1801.001 5.05 0.00000049 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cn_2.B c_3.NB gnd_Wt c_2.Bt
## cnd_rg2.Bck -0.636
## cnd_rg3.NBc -0.640 0.477
## gndrtrgt_Wt -0.491 0.255 0.256
## cnd_2.B:_Wt 0.282 -0.444 -0.212 -0.574
## cn_3.NB:_Wt 0.284 -0.212 -0.444 -0.578 0.477
Full posthoc tests
vsconfint <- data.frame(confint(emmeans(vs_mod, pairwise~cond_reg*gendertarget_f)$contrasts)) %>% dplyr::select(contrast, lower.CL, upper.CL)
vsemmeans <- emmeans(vs_mod, pairwise~cond_reg*gendertarget_f)$contrasts %>% as.data.frame()
vstukey <- left_join(
vsemmeans, vsconfint, by = "contrast"
)
vstukey %>%
separate(contrast, into = c("Condition1", "Condition2"), sep = " - ", extra = "merge")%>%
separate(Condition1, into = c("DEICondition", "GenderTarget"), sep = " ", extra = "merge")%>%
separate(Condition2, into = c("DEICondition2", "GenderTarget2"), sep = " ", extra = "merge") %>%
dplyr::select(-c(t.ratio))
Estimated marginal means
Graph
Voice Quality
Regressoin
## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: vq ~ cond_reg * gendertarget_f + (1 | person) + (1 | pid)
## Data: v1clean
##
## REML criterion at convergence: 8281
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.618 -0.526 0.056 0.557 3.105
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.82124 0.9062
## person (Intercept) 0.00251 0.0501
## Residual 1.32805 1.1524
## Number of obs: 2408, groups: pid, 602; person, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.5094 0.0907 23.9386 49.71 < 0.0000000000000002 ***
## cond_reg2.Backlash -0.1917 0.1213 966.8850 -1.58 0.1143
## cond_reg3.NoBacklash -0.3190 0.1205 966.8850 -2.65 0.0082 **
## gendertarget_fWoman trgt 0.3474 0.0935 6.8733 3.72 0.0078 **
## cond_reg2.Backlash:gendertarget_fWoman trgt 0.3440 0.1147 1801.0004 3.00 0.0027 **
## cond_reg3.NoBacklash:gendertarget_fWoman trgt 0.6437 0.1139 1801.0004 5.65 0.000000019 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cn_2.B c_3.NB gnd_Wt c_2.Bt
## cnd_rg2.Bck -0.634
## cnd_rg3.NBc -0.638 0.477
## gndrtrgt_Wt -0.515 0.275 0.277
## cnd_2.B:_Wt 0.300 -0.473 -0.226 -0.581
## cn_3.NB:_Wt 0.302 -0.226 -0.473 -0.585 0.477
Full posthoc tests
vqconfint <- data.frame(confint(emmeans(vq_mod, pairwise~cond_reg*gendertarget_f)$contrasts)) %>% dplyr::select(contrast, lower.CL, upper.CL)
vqemmeans <- emmeans(vq_mod, pairwise~cond_reg*gendertarget_f)$contrasts %>% as.data.frame()
vqtukey <- left_join(
vqemmeans, vqconfint, by = "contrast"
)
vqtukey %>%
separate(contrast, into = c("Condition1", "Condition2"), sep = " - ", extra = "merge")%>%
separate(Condition1, into = c("DEICondition", "GenderTarget"), sep = " ", extra = "merge")%>%
separate(Condition2, into = c("DEICondition2", "GenderTarget2"), sep = " ", extra = "merge") %>%
dplyr::select(-c(t.ratio))
Estimated marginal means
Graph
Interest
Regression
## Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
## Formula: interest ~ cond_reg * gendertarget_f + (1 | person) + (1 | pid)
## Data: v1clean
##
## REML criterion at convergence: 8251
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.764 -0.507 -0.007 0.548 3.389
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.857 0.926
## person (Intercept) 0.000 0.000
## Residual 1.297 1.139
## Number of obs: 2408, groups: pid, 602; person, 4
##
## Fixed effects:
## Estimate Std. Error df t value Pr(>|t|)
## (Intercept) 4.5775 0.0841 949.0684 54.44 < 0.0000000000000002 ***
## cond_reg2.Backlash -0.5775 0.1221 949.0684 -4.73 0.000002597730273 ***
## cond_reg3.NoBacklash -0.4074 0.1213 949.0684 -3.36 0.00081 ***
## gendertarget_fWoman trgt 0.2347 0.0780 1803.0000 3.01 0.00266 **
## cond_reg2.Backlash:gendertarget_fWoman trgt 0.6324 0.1133 1803.0000 5.58 0.000000027544499 ***
## cond_reg3.NoBacklash:gendertarget_fWoman trgt 0.8566 0.1126 1803.0000 7.61 0.000000000000044 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr) cn_2.B c_3.NB gnd_Wt c_2.Bt
## cnd_rg2.Bck -0.689
## cnd_rg3.NBc -0.693 0.477
## gndrtrgt_Wt -0.464 0.319 0.322
## cnd_2.B:_Wt 0.319 -0.464 -0.221 -0.689
## cn_3.NB:_Wt 0.322 -0.221 -0.464 -0.693 0.477
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
Full posthoc tests
interestconfint <- data.frame(confint(emmeans(interest_mod, pairwise~cond_reg*gendertarget_f)$contrasts)) %>% dplyr::select(contrast, lower.CL, upper.CL)
interestemmeans <- emmeans(interest_mod, pairwise~cond_reg*gendertarget_f)$contrasts %>% as.data.frame()
interesttukey <- left_join(
interestemmeans, interestconfint, by = "contrast"
)
interesttukey %>%
separate(contrast, into = c("Condition1", "Condition2"), sep = " - ", extra = "merge")%>%
separate(Condition1, into = c("DEICondition", "GenderTarget"), sep = " ", extra = "merge")%>%
separate(Condition2, into = c("DEICondition2", "GenderTarget2"), sep = " ", extra = "merge") %>%
dplyr::select(-c(t.ratio))
Estimated marginal means
Graph
In Paper - Mediation
v1cleanmed <- v1clean %>%
mutate(
gendertarget_num = case_when(
gendertarget == "Man trgt" ~ 0,
gendertarget == "Woman trgt" ~ 1),
deivscontrol = case_when(
cond_num == -1 ~ .5,
cond_num == 0 ~ .5,
cond_num == 1 ~ -1),
deivscontroltext = case_when(
deivscontrol == -1 ~ "control",
deivscontrol == .5 ~ "DEI"),
deivscontrol_f = factor(deivscontrol)) %>%
drop_na(rank)
detach_package <- function(pkg, character.only = FALSE)
{
if(!character.only)
{
pkg <- deparse(substitute(pkg))
}
search_item <- paste("package", pkg, sep = ":")
while(search_item %in% search())
{
detach(search_item, unload = TRUE, character.only = TRUE)
}
}
detach_package("afex", TRUE)
detach_package("lmerTest", TRUE)
## Warning: 'lmerTest' namespace cannot be unloaded:
## namespace 'lmerTest' is imported by 'multilevelTools' so cannot be unloaded
Moderated mediation - Normally coded
cond_num | cond |
---|---|
1 | DEI-Backlash |
0 | DEI-No Backlash |
-1 | Control |
DV: VS
Mediator: Interest
library(mediation) analyses
## Linear mixed model fit by REML ['lmerMod']
## Formula: interest ~ gendertarget * cond + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8225
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.767 -0.508 -0.009 0.549 3.395
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.861 0.928
## Residual 1.296 1.139
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5775 0.0842 54.38
## gendertargetWoman trgt 0.2347 0.0780 3.01
## conddei_backlash -0.5827 0.1224 -4.76
## conddei_nobacklash -0.4116 0.1216 -3.39
## gendertargetWoman trgt:conddei_backlash 0.6422 0.1135 5.66
## gendertargetWoman trgt:conddei_nobacklash 0.8622 0.1127 7.65
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.463
## cndd_bcklsh -0.688 0.319
## cndd_nbckls -0.692 0.321 0.476
## gndrtrgtWmntrgt:cndd_b 0.319 -0.688 -0.463 -0.221
## gndrtrgtWmntrgt:cndd_n 0.321 -0.692 -0.221 -0.463 0.476
## Linear mixed model fit by REML ['lmerMod']
## Formula: vs ~ gendertarget * cond + interest + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 7864
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.066 -0.495 0.043 0.550 3.813
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.808 0.899
## Residual 1.090 1.044
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.7712 0.1177 15.05
## gendertargetWoman trgt 0.2218 0.0717 3.09
## conddei_backlash 0.0583 0.1164 0.50
## conddei_nobacklash -0.0411 0.1154 -0.36
## interest 0.5951 0.0189 31.44
## gendertargetWoman trgt:conddei_backlash 0.0272 0.1048 0.26
## gendertargetWoman trgt:conddei_nobacklash 0.1139 0.1046 1.09
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n intrst gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.258
## cndd_bcklsh -0.533 0.301
## cndd_nbckls -0.517 0.305 0.479
## interest -0.736 -0.062 0.095 0.068
## gndrtrgtWmntrgt:cndd_b 0.293 -0.674 -0.455 -0.220 -0.116
## gndrtrgtWmntrgt:cndd_n 0.323 -0.673 -0.225 -0.453 -0.156 0.485
Results
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "dei_backlash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.522 0.424 0.63 <0.0000000000000002 ***
## ADE 0.247 0.098 0.40 0.0008 ***
## Total Effect 0.770 0.593 0.95 <0.0000000000000002 ***
## Prop. Mediated 0.679 0.554 0.84 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "dei_nobacklash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.654 0.551 0.76 <0.0000000000000002 ***
## ADE 0.336 0.182 0.49 <0.0000000000000002 ***
## Total Effect 0.989 0.814 1.17 <0.0000000000000002 ***
## Prop. Mediated 0.661 0.560 0.78 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "control"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.1389 0.0458 0.23 0.0032 **
## ADE 0.2209 0.0839 0.36 0.0004 ***
## Total Effect 0.3597 0.1962 0.53 <0.0000000000000002 ***
## Prop. Mediated 0.3844 0.1634 0.65 0.0032 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
library(bruceR) analyses
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("interest"),
mods = c("cond"),
y = "vs",
mod.path = "x-m",
cluster = "pid",
nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + cond + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ─────────────────────────────────────────────────────────────────────────
## (1) vs (2) interest (3) vs
## ─────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.695 *** 4.630 ***
## (0.051) (0.075) (0.071)
## gendertarget 0.697 *** 0.235 ** 0.266 ***
## (0.051) (0.078) (0.045)
## conddei_backlash -0.262 * 0.073
## (0.108) (0.104)
## conddei_nobacklash 0.019 0.016
## (0.108) (0.103)
## gendertarget:conddei_backlash 0.642 ***
## (0.113)
## gendertarget:conddei_nobacklash 0.862 ***
## (0.113)
## interest 0.598 ***
## (0.019)
## ─────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.077 0.323
## Conditional R^2 0.454 0.446 0.611
## AIC 8711.579 8241.141 7873.628
## BIC 8734.712 8287.407 7914.111
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 1.168 0.861 0.808
## Var: Residual 1.551 1.296 1.090
## ─────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.266 (0.045) 5.941 <.001 *** [0.178, 0.353]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 31.90 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.009 .003 ** [0.082, 0.388]
## dei_backlash 0.877 (0.082) 10.645 <.001 *** [0.716, 1.038]
## dei_nobacklash 1.097 (0.081) 13.489 <.001 *** [0.938, 1.256]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.140 (0.046) 3.023 .003 ** [0.050, 0.230]
## dei_backlash 0.524 (0.052) 10.049 <.001 *** [0.422, 0.626]
## dei_nobacklash 0.656 (0.052) 12.505 <.001 *** [0.555, 0.764]
## ──────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Calculate CI of indirect effect
Mediator: VQ
## Linear mixed model fit by REML ['lmerMod']
## Formula: vq ~ gendertarget * cond + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8258
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.590 -0.518 0.049 0.558 3.126
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.822 0.906
## Residual 1.332 1.154
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5094 0.0836 53.96
## gendertargetWoman trgt 0.3474 0.0791 4.39
## conddei_backlash -0.1979 0.1215 -1.63
## conddei_nobacklash -0.3181 0.1207 -2.63
## gendertargetWoman trgt:conddei_backlash 0.3463 0.1150 3.01
## gendertargetWoman trgt:conddei_nobacklash 0.6500 0.1142 5.69
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.473
## cndd_bcklsh -0.688 0.325
## cndd_nbckls -0.692 0.328 0.476
## gndrtrgtWmntrgt:cndd_b 0.325 -0.688 -0.473 -0.225
## gndrtrgtWmntrgt:cndd_n 0.328 -0.692 -0.225 -0.473 0.476
## Linear mixed model fit by REML ['lmerMod']
## Formula: vs ~ gendertarget * cond + vq + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6849
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.937 -0.448 0.026 0.475 4.112
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.572 0.756
## Residual 0.700 0.837
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 0.8885 0.0949 9.36
## gendertargetWoman trgt 0.0836 0.0576 1.45
## conddei_backlash -0.1302 0.0957 -1.36
## conddei_nobacklash -0.0317 0.0952 -0.33
## vq 0.7998 0.0152 52.69
## gendertargetWoman trgt:conddei_backlash 0.1325 0.0836 1.59
## gendertargetWoman trgt:conddei_nobacklash 0.1071 0.0834 1.28
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n vq gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.235
## cndd_bcklsh -0.499 0.295
## cndd_nbckls -0.516 0.295 0.477
## vq -0.721 -0.092 0.031 0.051
## gndrtrgtWmntrgt:cndd_b 0.253 -0.678 -0.437 -0.210 -0.063
## gndrtrgtWmntrgt:cndd_n 0.293 -0.674 -0.210 -0.438 -0.118 0.479
Results
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "dei_backlash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.556 0.422 0.69 <0.0000000000000002 ***
## ADE 0.216 0.100 0.34 <0.0000000000000002 ***
## Total Effect 0.773 0.599 0.95 <0.0000000000000002 ***
## Prop. Mediated 0.720 0.600 0.85 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "dei_nobacklash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.7996 0.6694 0.93 <0.0000000000000002 ***
## ADE 0.1900 0.0678 0.31 0.0016 **
## Total Effect 0.9896 0.8140 1.16 <0.0000000000000002 ***
## Prop. Mediated 0.8086 0.7118 0.92 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "control"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.2779 0.1502 0.40 <0.0000000000000002 ***
## ADE 0.0834 -0.0289 0.19 0.15
## Total Effect 0.3613 0.1968 0.53 <0.0000000000000002 ***
## Prop. Mediated 0.7691 0.5445 1.12 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
library(bruceR) analyses
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("vq"),
mods = c("cond"),
y = "vs",
mod.path = "x-m",
cluster = "pid", nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + cond + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ─────────────────────────────────────────────────────────────────────────
## (1) vs (2) vq (3) vs
## ─────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.683 *** 4.672 ***
## (0.051) (0.074) (0.059)
## gendertarget 0.697 *** 0.347 *** 0.159 ***
## (0.051) (0.079) (0.036)
## conddei_backlash -0.025 -0.064
## (0.107) (0.086)
## conddei_nobacklash 0.007 0.022
## (0.106) (0.086)
## gendertarget:conddei_backlash 0.346 **
## (0.115)
## gendertarget:conddei_nobacklash 0.650 ***
## (0.114)
## vq 0.802 ***
## (0.015)
## ─────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.057 0.544
## Conditional R^2 0.454 0.417 0.749
## AIC 8711.579 8273.893 6859.063
## BIC 8734.712 8320.159 6899.545
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 1.168 0.822 0.572
## Var: Residual 1.551 1.332 0.701
## ─────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.159 (0.036) 4.466 <.001 *** [0.089, 0.229]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 16.25 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.394 <.001 *** [0.192, 0.502]
## dei_backlash 0.694 (0.083) 8.308 <.001 *** [0.530, 0.857]
## dei_nobacklash 0.997 (0.082) 12.101 <.001 *** [0.836, 1.159]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.278 (0.064) 4.363 <.001 *** [0.153, 0.403]
## dei_backlash 0.558 (0.068) 8.179 <.001 *** [0.429, 0.692]
## dei_nobacklash 0.802 (0.068) 11.710 <.001 *** [0.669, 0.941]
## ──────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
DV: Rank
Mediator: Interest
library(mediation) analyses
## Linear mixed model fit by REML ['lmerMod']
## Formula: interest ~ gendertarget * cond + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8225
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.767 -0.508 -0.009 0.549 3.395
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.861 0.928
## Residual 1.296 1.139
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5775 0.0842 54.38
## gendertargetWoman trgt 0.2347 0.0780 3.01
## conddei_backlash -0.5827 0.1224 -4.76
## conddei_nobacklash -0.4116 0.1216 -3.39
## gendertargetWoman trgt:conddei_backlash 0.6422 0.1135 5.66
## gendertargetWoman trgt:conddei_nobacklash 0.8622 0.1127 7.65
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.463
## cndd_bcklsh -0.688 0.319
## cndd_nbckls -0.692 0.321 0.476
## gndrtrgtWmntrgt:cndd_b 0.319 -0.688 -0.463 -0.221
## gndrtrgtWmntrgt:cndd_n 0.321 -0.692 -0.221 -0.463 0.476
## boundary (singular) fit: see help('isSingular')
## Linear mixed model fit by REML ['lmerMod']
## Formula: rank_r ~ gendertarget * cond + interest + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6901
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3121 -0.7791 0.0252 0.8295 2.4566
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.00 0.00
## Residual 1.03 1.01
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.5819 0.0811 19.49
## gendertargetWoman trgt 0.1022 0.0695 1.47
## conddei_backlash -0.2568 0.0719 -3.57
## conddei_nobacklash -0.3742 0.0712 -5.26
## interest 0.1847 0.0141 13.09
## gendertargetWoman trgt:conddei_backlash 0.6102 0.1014 6.02
## gendertargetWoman trgt:conddei_nobacklash 0.7411 0.1011 7.33
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n intrst gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.390
## cndd_bcklsh -0.504 0.477
## cndd_nbckls -0.483 0.483 0.481
## interest -0.796 -0.048 0.114 0.082
## gndrtrgtWmntrgt:cndd_b 0.364 -0.680 -0.710 -0.341 -0.089
## gndrtrgtWmntrgt:cndd_n 0.390 -0.681 -0.346 -0.709 -0.120 0.481
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
Results
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "dei_backlash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.162 0.127 0.20 <0.0000000000000002 ***
## ADE 0.712 0.566 0.86 <0.0000000000000002 ***
## Total Effect 0.874 0.725 1.02 <0.0000000000000002 ***
## Prop. Mediated 0.185 0.141 0.24 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "dei_nobacklash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.203 0.161 0.25 <0.0000000000000002 ***
## ADE 0.843 0.701 0.98 <0.0000000000000002 ***
## Total Effect 1.046 0.905 1.19 <0.0000000000000002 ***
## Prop. Mediated 0.194 0.153 0.24 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "interest", covariates = list(cond = "control"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.04327 0.01471 0.07 0.0012 **
## ADE 0.10139 -0.03446 0.24 0.1448
## Total Effect 0.14467 0.00548 0.29 0.0432 *
## Prop. Mediated 0.28765 0.05024 1.60 0.0436 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
library(bruceR) analyses
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("interest"),
mods = c("cond"),
y = "rank_r",
mod.path = "x-m",
cluster = "pid",
nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + cond + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ─────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) interest (3) rank_r
## ─────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.695 *** 2.485 ***
## (0.022) (0.075) (0.035)
## gendertarget 0.672 *** 0.235 ** 0.529 ***
## (0.044) (0.078) (0.043)
## conddei_backlash -0.262 * 0.052
## (0.108) (0.051)
## conddei_nobacklash 0.019 -0.004
## (0.108) (0.051)
## gendertarget:conddei_backlash 0.642 ***
## (0.113)
## gendertarget:conddei_nobacklash 0.862 ***
## (0.113)
## interest 0.199 ***
## (0.014)
## ─────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.077 0.159
## Conditional R^2 0.090 0.446 0.159
## AIC 7137.751 8241.141 6970.050
## BIC 7160.884 8287.407 7010.533
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 0.000 0.861 0.000
## Var: Residual 1.138 1.296 1.053
## ─────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.529 (0.043) 12.255 <.001 *** [0.444, 0.613]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 31.90 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.009 .003 ** [0.082, 0.388]
## dei_backlash 0.877 (0.082) 10.645 <.001 *** [0.716, 1.038]
## dei_nobacklash 1.097 (0.081) 13.489 <.001 *** [0.938, 1.256]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────
## control 0.047 (0.016) 2.980 .003 ** [0.017, 0.078]
## dei_backlash 0.174 (0.021) 8.421 <.001 *** [0.134, 0.215]
## dei_nobacklash 0.218 (0.022) 9.845 <.001 *** [0.176, 0.263]
## ─────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Mediator: VQ
## Linear mixed model fit by REML ['lmerMod']
## Formula: vq ~ gendertarget * cond + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8258
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.590 -0.518 0.049 0.558 3.126
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.822 0.906
## Residual 1.332 1.154
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5094 0.0836 53.96
## gendertargetWoman trgt 0.3474 0.0791 4.39
## conddei_backlash -0.1979 0.1215 -1.63
## conddei_nobacklash -0.3181 0.1207 -2.63
## gendertargetWoman trgt:conddei_backlash 0.3463 0.1150 3.01
## gendertargetWoman trgt:conddei_nobacklash 0.6500 0.1142 5.69
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.473
## cndd_bcklsh -0.688 0.325
## cndd_nbckls -0.692 0.328 0.476
## gndrtrgtWmntrgt:cndd_b 0.325 -0.688 -0.473 -0.225
## gndrtrgtWmntrgt:cndd_n 0.328 -0.692 -0.225 -0.473 0.476
## boundary (singular) fit: see help('isSingular')
## Linear mixed model fit by REML ['lmerMod']
## Formula: rank_r ~ gendertarget * cond + vq + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6668
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6198 -0.7795 0.0309 0.7766 2.9658
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.000 0.000
## Residual 0.933 0.966
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.1651 0.0766 15.20
## gendertargetWoman trgt 0.0483 0.0663 0.73
## conddei_backlash -0.3090 0.0681 -4.54
## conddei_nobacklash -0.3612 0.0677 -5.33
## vq 0.2799 0.0135 20.80
## gendertargetWoman trgt:conddei_backlash 0.6319 0.0963 6.56
## gendertargetWoman trgt:conddei_nobacklash 0.7184 0.0960 7.49
##
## Correlation of Fixed Effects:
## (Intr) gndrWt cndd_b cndd_n vq gndrtrgtWmntrgt:cndd_b
## gndrtrgtWmt -0.375
## cndd_bcklsh -0.450 0.482
## cndd_nbckls -0.472 0.483 0.477
## vq -0.792 -0.070 0.039 0.063
## gndrtrgtWmntrgt:cndd_b 0.335 -0.682 -0.708 -0.339 -0.048
## gndrtrgtWmntrgt:cndd_n 0.370 -0.681 -0.338 -0.709 -0.091 0.478
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
library(mediation) analyses
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "dei_backlash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.194 0.146 0.24 <0.0000000000000002 ***
## ADE 0.679 0.536 0.82 <0.0000000000000002 ***
## Total Effect 0.873 0.728 1.02 <0.0000000000000002 ***
## Prop. Mediated 0.222 0.169 0.29 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "dei_nobacklash"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.279 0.229 0.33 <0.0000000000000002 ***
## ADE 0.766 0.625 0.91 <0.0000000000000002 ***
## Total Effect 1.045 0.903 1.19 <0.0000000000000002 ***
## Prop. Mediated 0.266 0.217 0.33 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget", mediator = "vq", covariates = list(cond = "control"), sims = 5000))
## Warning in mediate(model.m = modelm, model.y = modely, treat = "gendertarget", : treatment and control values do not match factor levels; using Man trgt and Woman trgt as control and treatment, respectively
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.09723 0.05466 0.14 <0.0000000000000002 ***
## ADE 0.04767 -0.08539 0.17 0.473
## Total Effect 0.14490 0.00721 0.28 0.036 *
## Prop. Mediated 0.65731 0.26965 3.52 0.036 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
library(bruceR) analyses
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("vq"),
mods = c("cond"),
y = "rank_r",
mod.path = "x-m",
cluster = "pid", nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + cond + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ─────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) vq (3) rank_r
## ─────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.683 *** 2.498 ***
## (0.022) (0.074) (0.034)
## gendertarget 0.672 *** 0.347 *** 0.478 ***
## (0.044) (0.079) (0.041)
## conddei_backlash -0.025 0.007
## (0.107) (0.049)
## conddei_nobacklash 0.007 -0.002
## (0.106) (0.048)
## gendertarget:conddei_backlash 0.346 **
## (0.115)
## gendertarget:conddei_nobacklash 0.650 ***
## (0.114)
## vq 0.289 ***
## (0.014)
## ─────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.057 0.235
## Conditional R^2 0.090 0.417 0.235
## AIC 7137.751 8273.893 6743.166
## BIC 7160.884 8320.159 6783.649
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 0.000 0.822 0.000
## Var: Residual 1.138 1.332 0.958
## ─────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.478 (0.041) 11.659 <.001 *** [0.398, 0.558]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 16.25 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.394 <.001 *** [0.192, 0.502]
## dei_backlash 0.694 (0.083) 8.308 <.001 *** [0.530, 0.857]
## dei_nobacklash 0.997 (0.082) 12.101 <.001 *** [0.836, 1.159]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.100 (0.023) 4.273 <.001 *** [0.054, 0.147]
## dei_backlash 0.202 (0.026) 7.797 <.001 *** [0.153, 0.253]
## dei_nobacklash 0.289 (0.027) 10.587 <.001 *** [0.237, 0.342]
## ──────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Dual mediatiors
Rank
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("interest", "vq"),
mods = c("cond"),
y = "rank_r",
mod.path = "x-m",
cluster = "pid", nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest, vq
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*cond + (1 | pid)
## - vq ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + cond + interest + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ───────────────────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) interest (3) vq (4) rank_r
## ───────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.695 *** 4.683 *** 2.495 ***
## (0.022) (0.075) (0.074) (0.034)
## gendertarget 0.672 *** 0.235 ** 0.347 *** 0.464 ***
## (0.044) (0.078) (0.079) (0.041)
## conddei_backlash -0.262 * -0.025 0.018
## (0.108) (0.107) (0.049)
## conddei_nobacklash 0.019 0.007 -0.003
## (0.108) (0.106) (0.048)
## gendertarget:conddei_backlash 0.642 *** 0.346 **
## (0.113) (0.115)
## gendertarget:conddei_nobacklash 0.862 *** 0.650 ***
## (0.113) (0.114)
## interest 0.044 **
## (0.017)
## vq 0.263 ***
## (0.017)
## ───────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.077 0.057 0.237
## Conditional R^2 0.090 0.446 0.417 0.237
## AIC 7137.751 8241.141 8273.893 6744.575
## BIC 7160.884 8287.407 8320.159 6790.841
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 0.000 0.861 0.822 0.000
## Var: Residual 1.138 1.296 1.332 0.956
## ───────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.464 (0.041) 11.227 <.001 *** [0.383, 0.544]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 31.90 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.009 .003 ** [0.082, 0.388]
## dei_backlash 0.877 (0.082) 10.645 <.001 *** [0.716, 1.038]
## dei_nobacklash 1.097 (0.081) 13.489 <.001 *** [0.938, 1.256]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────
## control 0.010 (0.005) 1.924 .054 . [0.002, 0.022]
## dei_backlash 0.039 (0.015) 2.565 .010 * [0.010, 0.069]
## dei_nobacklash 0.048 (0.019) 2.590 .010 ** [0.012, 0.086]
## ─────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 16.25 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.394 <.001 *** [0.192, 0.502]
## dei_backlash 0.694 (0.083) 8.308 <.001 *** [0.530, 0.857]
## dei_nobacklash 0.997 (0.082) 12.101 <.001 *** [0.836, 1.159]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────
## control 0.091 (0.022) 4.166 <.001 *** [0.048, 0.135]
## dei_backlash 0.183 (0.025) 7.364 <.001 *** [0.136, 0.233]
## dei_nobacklash 0.263 (0.027) 9.616 <.001 *** [0.211, 0.318]
## ─────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
VS
bruceR::PROCESS(
data = v1cleanmed,
x = "gendertarget",
meds = c("interest", "vq"),
mods = c("cond"),
y = "vs",
mod.path = "x-m",
cluster = "pid", nsim = 5000
)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest, vq
## - Moderators (W) : cond
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*cond + (1 | pid)
## - vq ~ gendertarget*cond + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + cond + interest + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ───────────────────────────────────────────────────────────────────────────────────────
## (1) vs (2) interest (3) vq (4) vs
## ───────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.695 *** 4.683 *** 4.656 ***
## (0.051) (0.075) (0.074) (0.058)
## gendertarget 0.697 *** 0.235 ** 0.347 *** 0.087 *
## (0.051) (0.078) (0.079) (0.035)
## conddei_backlash -0.262 * -0.025 -0.012
## (0.108) (0.107) (0.085)
## conddei_nobacklash 0.019 0.007 0.019
## (0.108) (0.106) (0.084)
## gendertarget:conddei_backlash 0.642 *** 0.346 **
## (0.113) (0.115)
## gendertarget:conddei_nobacklash 0.862 *** 0.650 ***
## (0.113) (0.114)
## interest 0.210 ***
## (0.018)
## vq 0.683 ***
## (0.018)
## ───────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.077 0.057 0.569
## Conditional R^2 0.454 0.446 0.417 0.766
## AIC 8711.579 8241.141 8273.893 6732.225
## BIC 8734.712 8287.407 8320.159 6778.491
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 1.168 0.861 0.822 0.554
## Var: Residual 1.551 1.296 1.332 0.659
## ───────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed()
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.087 (0.035) 2.493 .013 * [0.019, 0.156]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 31.90 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.009 .003 ** [0.082, 0.388]
## dei_backlash 0.877 (0.082) 10.645 <.001 *** [0.716, 1.038]
## dei_nobacklash 1.097 (0.081) 13.489 <.001 *** [0.938, 1.256]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────
## control 0.049 (0.017) 2.921 .003 ** [0.017, 0.084]
## dei_backlash 0.184 (0.024) 7.792 <.001 *** [0.138, 0.232]
## dei_nobacklash 0.230 (0.026) 9.013 <.001 *** [0.182, 0.282]
## ─────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────
## gendertarget * cond 16.25 2 1797 <.001 ***
## ─────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.394 <.001 *** [0.192, 0.502]
## dei_backlash 0.694 (0.083) 8.308 <.001 *** [0.530, 0.857]
## dei_nobacklash 0.997 (0.082) 12.101 <.001 *** [0.836, 1.159]
## ──────────────────────────────────────────────────────────────
##
## Running 5000 * 3 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────
## "cond" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────
## control 0.236 (0.055) 4.315 <.001 *** [0.129, 0.344]
## dei_backlash 0.475 (0.058) 8.200 <.001 *** [0.366, 0.593]
## dei_nobacklash 0.683 (0.059) 11.583 <.001 *** [0.569, 0.799]
## ──────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Moderated mediation - Contrast Coded
DV: VS
Mediator: Interest
## Linear mixed model fit by REML ['lmerMod']
## Formula: interest ~ gendertarget_num * deivscontroltext + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8230
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.684 -0.571 -0.013 0.545 3.409
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.872 0.934
## Residual 1.298 1.139
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5775 0.0845 54.18
## gendertarget_num 0.2347 0.0781 3.01
## deivscontroltextDEI -0.4961 0.1052 -4.72
## gendertarget_num:deivscontroltextDEI 0.7536 0.0972 7.75
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI
## gndrtrgt_nm -0.462
## dvscntrlDEI -0.803 0.371
## gndrtr_:DEI 0.371 -0.803 -0.462
## Linear mixed model fit by REML ['lmerMod']
## Formula: vs ~ gendertarget_num * deivscontroltext + interest + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 7860
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -4.053 -0.500 0.051 0.550 3.799
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.806 0.898
## Residual 1.090 1.044
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.77066 0.11755 15.06
## gendertarget_num 0.22178 0.07168 3.09
## deivscontroltextDEI 0.00798 0.09963 0.08
## interest 0.59523 0.01888 31.52
## gendertarget_num:deivscontroltextDEI 0.07105 0.09021 0.79
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI intrst
## gndrtrgt_nm -0.258
## dvscntrlDEI -0.611 0.353
## interest -0.735 -0.062 0.094
## gndrtr_:DEI 0.357 -0.782 -0.456 -0.158
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "interest", covariates = list(deivscontroltext = "control"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.1395 0.0445 0.23 0.0032 **
## ADE 0.2229 0.0820 0.37 0.0036 **
## Total Effect 0.3624 0.1940 0.53 <0.0000000000000002 ***
## Prop. Mediated 0.3858 0.1602 0.65 0.0032 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "interest", covariates = list(deivscontroltext = "DEI"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.588 0.513 0.67 <0.0000000000000002 ***
## ADE 0.293 0.184 0.40 <0.0000000000000002 ***
## Total Effect 0.881 0.756 1.00 <0.0000000000000002 ***
## Prop. Mediated 0.667 0.583 0.77 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
Mediator: VQ
## Linear mixed model fit by REML ['lmerMod']
## Formula: vq ~ gendertarget_num * deivscontroltext + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8260
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.515 -0.536 0.060 0.572 3.119
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.819 0.905
## Residual 1.336 1.156
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5094 0.0835 53.98
## gendertarget_num 0.3474 0.0792 4.39
## deivscontroltextDEI -0.2587 0.1040 -2.49
## gendertarget_num:deivscontroltextDEI 0.5001 0.0986 5.07
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI
## gndrtrgt_nm -0.474
## dvscntrlDEI -0.803 0.381
## gndrtr_:DEI 0.381 -0.803 -0.474
## Linear mixed model fit by REML ['lmerMod']
## Formula: vs ~ gendertarget_num * deivscontroltext + vq + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6844
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.933 -0.444 0.025 0.483 4.112
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.572 0.756
## Residual 0.700 0.837
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 0.8892 0.0949 9.37
## gendertarget_num 0.0837 0.0576 1.45
## deivscontroltextDEI -0.0804 0.0820 -0.98
## vq 0.7997 0.0152 52.77
## gendertarget_num:deivscontroltextDEI 0.1197 0.0718 1.67
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI vq
## gndrtrgt_nm -0.235
## dvscntrlDEI -0.591 0.344
## vq -0.720 -0.091 0.048
## gndrtr_:DEI 0.317 -0.786 -0.438 -0.106
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "vq", covariates = list(deivscontroltext = "control"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.2774 0.1529 0.40 <0.0000000000000002 ***
## ADE 0.0836 -0.0290 0.20 0.14
## Total Effect 0.3611 0.1923 0.53 <0.0000000000000002 ***
## Prop. Mediated 0.7673 0.5377 1.12 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "vq", covariates = list(deivscontroltext = "DEI"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.677 0.581 0.77 <0.0000000000000002 ***
## ADE 0.203 0.115 0.29 <0.0000000000000002 ***
## Total Effect 0.881 0.752 1.00 <0.0000000000000002 ***
## Prop. Mediated 0.769 0.693 0.86 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
DV: Rank
Mediator: Interest
## Linear mixed model fit by REML ['lmerMod']
## Formula: interest ~ gendertarget_num * deivscontroltext + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8230
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.684 -0.571 -0.013 0.545 3.409
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.872 0.934
## Residual 1.298 1.139
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5775 0.0845 54.18
## gendertarget_num 0.2347 0.0781 3.01
## deivscontroltextDEI -0.4961 0.1052 -4.72
## gendertarget_num:deivscontroltextDEI 0.7536 0.0972 7.75
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI
## gndrtrgt_nm -0.462
## dvscntrlDEI -0.803 0.371
## gndrtr_:DEI 0.371 -0.803 -0.462
## boundary (singular) fit: see help('isSingular')
## Linear mixed model fit by REML ['lmerMod']
## Formula: rank_r ~ gendertarget_num * deivscontroltext + interest + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6896
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.3041 -0.8091 -0.0043 0.8365 2.5132
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.00 0.00
## Residual 1.03 1.01
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.5844 0.0810 19.56
## gendertarget_num 0.1023 0.0695 1.47
## deivscontroltextDEI -0.3165 0.0616 -5.14
## interest 0.1841 0.0141 13.09
## gendertarget_num:deivscontroltextDEI 0.6769 0.0871 7.77
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI intrst
## gndrtrgt_nm -0.391
## dvscntrlDEI -0.574 0.558
## interest -0.795 -0.047 0.113
## gndrtr_:DEI 0.439 -0.790 -0.711 -0.122
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "interest", covariates = list(deivscontroltext = "control"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.04333 0.01448 0.07 0.0032 **
## ADE 0.10204 -0.03279 0.24 0.1412
## Total Effect 0.14537 0.00571 0.28 0.0408 *
## Prop. Mediated 0.29062 0.04110 1.62 0.0440 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "interest", covariates = list(deivscontroltext = "DEI"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.182 0.149 0.22 <0.0000000000000002 ***
## ADE 0.779 0.674 0.88 <0.0000000000000002 ***
## Total Effect 0.961 0.860 1.07 <0.0000000000000002 ***
## Prop. Mediated 0.189 0.152 0.23 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
Mediator: VQ
## Linear mixed model fit by REML ['lmerMod']
## Formula: vq ~ gendertarget_num * deivscontroltext + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 8260
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -3.515 -0.536 0.060 0.572 3.119
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.819 0.905
## Residual 1.336 1.156
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 4.5094 0.0835 53.98
## gendertarget_num 0.3474 0.0792 4.39
## deivscontroltextDEI -0.2587 0.1040 -2.49
## gendertarget_num:deivscontroltextDEI 0.5001 0.0986 5.07
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI
## gndrtrgt_nm -0.474
## dvscntrlDEI -0.803 0.381
## gndrtr_:DEI 0.381 -0.803 -0.474
## boundary (singular) fit: see help('isSingular')
## Linear mixed model fit by REML ['lmerMod']
## Formula: rank_r ~ gendertarget_num * deivscontroltext + vq + (1 | pid)
## Data: v1cleanmed
##
## REML criterion at convergence: 6662
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.6038 -0.7800 0.0486 0.7940 2.9955
##
## Random effects:
## Groups Name Variance Std.Dev.
## pid (Intercept) 0.000 0.000
## Residual 0.932 0.965
## Number of obs: 2400, groups: pid, 600
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 1.1630 0.0766 15.19
## gendertarget_num 0.0481 0.0663 0.73
## deivscontroltextDEI -0.3353 0.0583 -5.75
## vq 0.2804 0.0134 20.86
## gendertarget_num:deivscontroltextDEI 0.6755 0.0826 8.17
##
## Correlation of Fixed Effects:
## (Intr) gndrt_ dvsDEI vq
## gndrtrgt_nm -0.375
## dvscntrlDEI -0.537 0.561
## vq -0.792 -0.070 0.060
## gndrtr_:DEI 0.410 -0.793 -0.708 -0.081
## optimizer (nloptwrap) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "vq", covariates = list(deivscontroltext = "control"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.09762 0.05333 0.14 <0.0000000000000002 ***
## ADE 0.04840 -0.08177 0.18 0.446
## Total Effect 0.14602 0.00905 0.28 0.038 *
## Prop. Mediated 0.64952 0.25685 3.16 0.038 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
summary(mediate(model.m = modelm, model.y = modely, treat = "gendertarget_num", mediator = "vq", covariates = list(deivscontroltext = "DEI"), sims = 5000))
##
## Causal Mediation Analysis
##
## Quasi-Bayesian Confidence Intervals
##
## (Inference Conditional on the Covariate Values Specified in `covariates')
##
## Mediator Groups: pid
##
## Outcome Groups: pid
##
## Output Based on Overall Averages Across Groups
##
## Estimate 95% CI Lower 95% CI Upper p-value
## ACME 0.238 0.200 0.28 <0.0000000000000002 ***
## ADE 0.723 0.625 0.82 <0.0000000000000002 ***
## Total Effect 0.961 0.860 1.06 <0.0000000000000002 ***
## Prop. Mediated 0.248 0.207 0.29 <0.0000000000000002 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Sample Size Used: 2400
##
##
## Simulations: 5000
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("vq"),
y = "vs",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + deivscontroltext + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ──────────────────────────────────────────────────────────────────────────
## (1) vs (2) vq (3) vs
## ──────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.683 *** 4.672 ***
## (0.051) (0.074) (0.059)
## gendertarget 0.697 *** 0.347 *** 0.159 ***
## (0.051) (0.079) (0.036)
## deivscontroltextDEI -0.009 -0.021
## (0.092) (0.074)
## gendertarget:deivscontroltextDEI 0.500 ***
## (0.099)
## vq 0.802 ***
## (0.015)
## ──────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.056 0.544
## Conditional R^2 0.454 0.414 0.749
## AIC 8711.579 8271.631 6854.989
## BIC 8734.712 8306.330 6889.689
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 1.168 0.819 0.572
## Var: Residual 1.551 1.336 0.701
## ──────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.159 (0.036) 4.464 <.001 *** [0.089, 0.229]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 25.72 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.280 (0.063) 4.441 <.001 *** [0.154, 0.404]
## DEI 0.681 (0.049) 13.947 <.001 *** [0.587, 0.778]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("interest"),
y = "vs",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + deivscontroltext + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ──────────────────────────────────────────────────────────────────────────
## (1) vs (2) interest (3) vs
## ──────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.695 *** 4.630 ***
## (0.051) (0.075) (0.071)
## gendertarget 0.697 *** 0.235 ** 0.266 ***
## (0.051) (0.078) (0.045)
## deivscontroltextDEI -0.119 0.044
## (0.093) (0.089)
## gendertarget:deivscontroltextDEI 0.754 ***
## (0.097)
## interest 0.598 ***
## (0.019)
## ──────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.071 0.323
## Conditional R^2 0.454 0.444 0.611
## AIC 8711.579 8242.133 7869.263
## BIC 8734.712 8276.832 7903.962
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 1.168 0.872 0.806
## Var: Residual 1.551 1.298 1.090
## ──────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.266 (0.045) 5.950 <.001 *** [0.178, 0.353]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 60.11 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.141 (0.046) 3.044 .002 ** [0.049, 0.233]
## DEI 0.591 (0.039) 15.114 <.001 *** [0.517, 0.671]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("interest"),
y = "rank_r",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - interest ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + deivscontroltext + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ──────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) interest (3) rank_r
## ──────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.695 *** 2.485 ***
## (0.022) (0.075) (0.035)
## gendertarget 0.672 *** 0.235 ** 0.529 ***
## (0.044) (0.078) (0.043)
## deivscontroltextDEI -0.119 0.024
## (0.093) (0.044)
## gendertarget:deivscontroltextDEI 0.754 ***
## (0.097)
## interest 0.197 ***
## (0.014)
## ──────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.071 0.159
## Conditional R^2 0.090 0.444 0.159
## AIC 7137.751 8242.133 6965.125
## BIC 7160.884 8276.832 6999.824
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 0.000 0.872 0.000
## Var: Residual 1.138 1.298 1.053
## ──────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.529 (0.043) 12.276 <.001 *** [0.445, 0.614]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 60.11 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.047 (0.016) 2.977 .003 ** [0.016, 0.078]
## DEI 0.195 (0.018) 10.856 <.001 *** [0.161, 0.232]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("vq"),
y = "rank_r",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Moderated Mediation
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + deivscontroltext + vq + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ──────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) vq (3) rank_r
## ──────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.683 *** 2.498 ***
## (0.022) (0.074) (0.034)
## gendertarget 0.672 *** 0.347 *** 0.478 ***
## (0.044) (0.079) (0.041)
## deivscontroltextDEI -0.009 0.003
## (0.092) (0.042)
## gendertarget:deivscontroltextDEI 0.500 ***
## (0.099)
## vq 0.289 ***
## (0.014)
## ──────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.056 0.235
## Conditional R^2 0.090 0.414 0.235
## AIC 7137.751 8271.631 6737.037
## BIC 7160.884 8306.330 6771.736
## Num. obs. 2400 2400 2400
## Num. groups: pid 600 600 600
## Var: pid (Intercept) 0.000 0.819 0.000
## Var: Residual 1.138 1.336 0.958
## ──────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Moderated Mediation (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.478 (0.041) 11.662 <.001 *** [0.398, 0.558]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 25.72 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.101 (0.023) 4.352 <.001 *** [0.055, 0.147]
## DEI 0.246 (0.020) 11.990 <.001 *** [0.207, 0.288]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Parallel Mediation and moderated mediation
DEVIS Control
DV: Rank
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("vq", "interest"),
y = "rank_r",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq, interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*deivscontroltext + (1 | pid)
## - interest ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget + deivscontroltext + vq + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ────────────────────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) vq (3) interest (4) rank_r
## ────────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.683 *** 4.695 *** 2.495 ***
## (0.022) (0.074) (0.075) (0.034)
## gendertarget 0.672 *** 0.347 *** 0.235 ** 0.464 ***
## (0.044) (0.079) (0.078) (0.041)
## deivscontroltextDEI -0.009 -0.119 0.007
## (0.092) (0.093) (0.042)
## gendertarget:deivscontroltextDEI 0.500 *** 0.754 ***
## (0.099) (0.097)
## vq 0.264 ***
## (0.017)
## interest 0.043 **
## (0.017)
## ────────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.056 0.071 0.237
## Conditional R^2 0.090 0.414 0.444 0.237
## AIC 7137.751 8271.631 8242.133 6738.589
## BIC 7160.884 8306.330 8276.832 6779.072
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 0.000 0.819 0.872 0.000
## Var: Residual 1.138 1.336 1.298 0.955
## ────────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.464 (0.041) 11.236 <.001 *** [0.383, 0.545]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 25.72 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.092 (0.021) 4.305 <.001 *** [0.051, 0.134]
## DEI 0.224 (0.021) 10.677 <.001 *** [0.184, 0.266]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 60.11 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────────
## control 0.010 (0.005) 1.946 .052 . [0.001, 0.022]
## DEI 0.043 (0.017) 2.592 .010 ** [0.011, 0.077]
## ─────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
DV: VS
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("vq", "interest"),
y = "vs",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq, interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*deivscontroltext + (1 | pid)
## - interest ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + deivscontroltext + vq + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ────────────────────────────────────────────────────────────────────────────────────────
## (1) vs (2) vq (3) interest (4) vs
## ────────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.683 *** 4.695 *** 4.656 ***
## (0.051) (0.074) (0.075) (0.058)
## gendertarget 0.697 *** 0.347 *** 0.235 ** 0.087 *
## (0.051) (0.079) (0.078) (0.035)
## deivscontroltextDEI -0.009 -0.119 0.004
## (0.092) (0.093) (0.072)
## gendertarget:deivscontroltextDEI 0.500 *** 0.754 ***
## (0.099) (0.097)
## vq 0.683 ***
## (0.018)
## interest 0.210 ***
## (0.018)
## ────────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.056 0.071 0.569
## Conditional R^2 0.454 0.414 0.444 0.766
## AIC 8711.579 8271.631 8242.133 6727.287
## BIC 8734.712 8306.330 8276.832 6767.770
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 1.168 0.819 0.872 0.552
## Var: Residual 1.551 1.336 1.298 0.659
## ────────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.087 (0.035) 2.490 .013 * [0.019, 0.156]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 25.72 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.238 (0.054) 4.438 <.001 *** [0.131, 0.345]
## DEI 0.580 (0.043) 13.507 <.001 *** [0.496, 0.665]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 60.11 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────────
## control 0.050 (0.017) 2.948 .003 ** [0.017, 0.084]
## DEI 0.208 (0.021) 9.712 <.001 *** [0.168, 0.252]
## ─────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
DEVIS Control
DV: Rank
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget_f",
meds = c("vq", "interest"),
y = "rank_r",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : rank_r
## - Predictor (X) : gendertarget_f (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq, interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget_f*deivscontroltext + (1 | pid)
## - interest ~ gendertarget_f*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - rank_r ~ gendertarget_f + deivscontroltext + vq + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
## boundary (singular) fit: see help('isSingular')
##
## Model Summary
##
## ──────────────────────────────────────────────────────────────────────────────────────────
## (1) rank_r (2) vq (3) interest (4) rank_r
## ──────────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 2.500 *** 4.683 *** 4.695 *** 2.495 ***
## (0.022) (0.074) (0.075) (0.034)
## gendertarget_f 0.672 *** 0.347 *** 0.235 ** 0.464 ***
## (0.044) (0.079) (0.078) (0.041)
## deivscontroltextDEI -0.009 -0.119 0.007
## (0.092) (0.093) (0.042)
## gendertarget_f:deivscontroltextDEI 0.500 *** 0.754 ***
## (0.099) (0.097)
## vq 0.264 ***
## (0.017)
## interest 0.043 **
## (0.017)
## ──────────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.090 0.056 0.071 0.237
## Conditional R^2 0.090 0.414 0.444 0.237
## AIC 7137.751 8271.631 8242.133 6738.589
## BIC 7160.884 8306.330 8276.832 6779.072
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 0.000 0.819 0.872 0.000
## Var: Residual 1.138 1.336 1.298 0.955
## ──────────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget_f" (X) ==> "rank_r" (Y)
## Computing profile confidence intervals ...
## ───────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ───────────────────────────────────────────────────────────
## Direct (c') 0.464 (0.041) 11.236 <.001 *** [0.383, 0.545]
## ───────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ───────────────────────────────────────────────────────────
## F df1 df2 p
## ───────────────────────────────────────────────────────────
## gendertarget_f * deivscontroltext 25.72 1 1798 <.001 ***
## ───────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget_f" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget_f" (X) ==> "vq" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.092 (0.021) 4.305 <.001 *** [0.051, 0.134]
## DEI 0.224 (0.021) 10.677 <.001 *** [0.184, 0.266]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "interest" (M)
## ───────────────────────────────────────────────────────────
## F df1 df2 p
## ───────────────────────────────────────────────────────────
## gendertarget_f * deivscontroltext 60.11 1 1798 <.001 ***
## ───────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget_f" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget_f" (X) ==> "interest" (M) ==> "rank_r" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────────
## control 0.010 (0.005) 1.946 .052 . [0.001, 0.022]
## DEI 0.043 (0.017) 2.592 .010 ** [0.011, 0.077]
## ─────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
DV: VS
bruceR::PROCESS(data = v1cleanmed,
x = "gendertarget",
meds = c("vq", "interest"),
y = "vs",
mods = "deivscontroltext",
clusters = "pid",
med.type = "parallel",
mod.type = "2-way",
mod.path = "x-m",
mod1.val = c("control", "DEI"), nsim = 5000, seed = 1)
##
## NOTE:
## ci has been reset to "mcmc" because bootstrap method is not applicable to multilevel models.
##
## ****************** PART 1. Regression Model Summary ******************
##
## PROCESS Model Code : 7 (Hayes, 2018; www.guilford.com/p/hayes3)
## PROCESS Model Type : Parallel Multiple Moderated Mediation (2 meds)
## - Outcome (Y) : vs
## - Predictor (X) : gendertarget (recoded: Man trgt=0, Woman trgt=1)
## - Mediators (M) : vq, interest
## - Moderators (W) : deivscontroltext
## - Covariates (C) : -
## - HLM Clusters : pid
##
## All numeric predictors have been grand-mean centered.
## (For details, please see the help page of PROCESS.)
##
## Formula of Mediator:
## - vq ~ gendertarget*deivscontroltext + (1 | pid)
## - interest ~ gendertarget*deivscontroltext + (1 | pid)
## Formula of Outcome:
## - vs ~ gendertarget + deivscontroltext + vq + interest + (1 | pid)
##
## CAUTION:
## Fixed effect (coef.) of a predictor involved in an interaction
## denotes its "simple effect/slope" at the other predictor = 0.
## Only when all predictors in an interaction are mean-centered
## can the fixed effect denote the "main effect"!
##
## Model Summary
##
## ────────────────────────────────────────────────────────────────────────────────────────
## (1) vs (2) vq (3) interest (4) vs
## ────────────────────────────────────────────────────────────────────────────────────────
## (Intercept) 4.658 *** 4.683 *** 4.695 *** 4.656 ***
## (0.051) (0.074) (0.075) (0.058)
## gendertarget 0.697 *** 0.347 *** 0.235 ** 0.087 *
## (0.051) (0.079) (0.078) (0.035)
## deivscontroltextDEI -0.009 -0.119 0.004
## (0.092) (0.093) (0.072)
## gendertarget:deivscontroltextDEI 0.500 *** 0.754 ***
## (0.099) (0.097)
## vq 0.683 ***
## (0.018)
## interest 0.210 ***
## (0.018)
## ────────────────────────────────────────────────────────────────────────────────────────
## Marginal R^2 0.043 0.056 0.071 0.569
## Conditional R^2 0.454 0.414 0.444 0.766
## AIC 8711.579 8271.631 8242.133 6727.287
## BIC 8734.712 8306.330 8276.832 6767.770
## Num. obs. 2400 2400 2400 2400
## Num. groups: pid 600 600 600 600
## Var: pid (Intercept) 1.168 0.819 0.872 0.552
## Var: Residual 1.551 1.336 1.298 0.659
## ────────────────────────────────────────────────────────────────────────────────────────
## Note. * p < .05, ** p < .01, *** p < .001.
##
## ************ PART 2. Mediation/Moderation Effect Estimate ************
##
## Package Use : ‘mediation’ (v4.5.0), ‘interactions’ (v1.1.5)
## Effect Type : Parallel Multiple Moderated Mediation (2 meds) (Model 7)
## Sample Size : 2400
## Random Seed : set.seed(1)
## Simulations : 5000 (Bootstrap)
##
## Direct Effect: "gendertarget" (X) ==> "vs" (Y)
## Computing profile confidence intervals ...
## ──────────────────────────────────────────────────────────
## Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────
## Direct (c') 0.087 (0.035) 2.490 .013 * [0.019, 0.156]
## ──────────────────────────────────────────────────────────
##
## Interaction Effect on "vq" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 25.72 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "vq" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.347 (0.079) 4.387 <.001 *** [0.192, 0.503]
## DEI 0.848 (0.059) 14.426 <.001 *** [0.732, 0.963]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "vq" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.238 (0.054) 4.438 <.001 *** [0.131, 0.345]
## DEI 0.580 (0.043) 13.507 <.001 *** [0.496, 0.665]
## ──────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Interaction Effect on "interest" (M)
## ─────────────────────────────────────────────────────────
## F df1 df2 p
## ─────────────────────────────────────────────────────────
## gendertarget * deivscontroltext 60.11 1 1798 <.001 ***
## ─────────────────────────────────────────────────────────
##
## Simple Slopes: "gendertarget" (X) ==> "interest" (M)
## (Conditional Effects [a] of X on M)
## ──────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. t p [95% CI]
## ──────────────────────────────────────────────────────────────────
## control 0.235 (0.078) 3.007 .003 ** [0.082, 0.388]
## DEI 0.988 (0.058) 17.066 <.001 *** [0.875, 1.102]
## ──────────────────────────────────────────────────────────────────
##
## Running 5000 * 2 simulations...
## Indirect Path: "gendertarget" (X) ==> "interest" (M) ==> "vs" (Y)
## (Conditional Indirect Effects [ab] of X through M on Y)
## ─────────────────────────────────────────────────────────────────
## "deivscontroltext" Effect S.E. z p [MCMC 95% CI]
## ─────────────────────────────────────────────────────────────────
## control 0.050 (0.017) 2.948 .003 ** [0.017, 0.084]
## DEI 0.208 (0.021) 9.712 <.001 *** [0.168, 0.252]
## ─────────────────────────────────────────────────────────────────
## Monte Carlo (Quasi-Bayesian) Confidence Interval
## (Effect, SE, and CI are estimated based on 5000 Monte Carlo samples.)
##
## Note. The results based on bootstrapping or other random processes
## are unlikely identical to other statistical software (e.g., SPSS).
## To make results reproducible, you need to set a seed (any number).
## Please see the help page for details: help(PROCESS)
## Ignore this note if you have already set a seed. :)
Calculate index of moderated mediation
library(tidyverse)
test <- data.frame(
mod_on_med = dplyr::pull(parameters::bootstrap_model(lmer(interest~gendertarget_num*deivscontroltext + (1 | pid), v1cleanmed))["gendertarget_num:deivscontroltextDEI"]),
mod_on_y = dplyr::pull(parameters::bootstrap_model(lmer(vs~gendertarget_num*deivscontroltext + interest + (1 | pid), v1cleanmed))["gendertarget_num:deivscontroltextDEI"]))
test %>%
dplyr::rowwise() %>%
dplyr::mutate(indexbstrp = mod_on_med * mod_on_y)