Performs Monte Carlo simulation to estimate confidence intervals for both unstandardized and (optionally) standardized mediation parameters, based on fitted SEM models.
run_mc_mediation(
fit,
data,
standardized = FALSE,
R = 20000,
seed = 123,
alpha = 0.05,
alphastd = 0.05
)A list with unstandardized and (if requested) standardized results. Each result includes Monte Carlo estimates, SEs, and CIs.
A fitted lavaan model.
The dataset used for the fitted model.
Logical. If TRUE, standardized results will also be returned. Default is FALSE.
Integer. Number of Monte Carlo replications. Default is 20000.
Integer. Random seed for reproducibility. Default is 123.
Numeric value for the confidence level of unstandardized Monte Carlo intervals. Default is 0.05.
Numeric value for the confidence level of standardized Monte Carlo intervals. Default is 0.05.