# Compile all results
results <- list(
# Point estimates
estimates = list(
a = med_data@a_path,
b = med_data@b_path,
indirect = med_data@a_path * med_data@b_path,
direct = med_data@c_prime
),
# Confidence intervals
ci_dop = ci_dop$CI,
ci_mc = ci_mc$CI,
ci_boot = c(boot_result@ci_lower, boot_result@ci_upper),
# Effect size
pmed = pmed_result$pmed,
# Sensitivity
sensitivity = sens_bounds
)
# Pretty print
cat("=== Mediation Analysis Results ===\n\n")
cat("Point Estimates:\n")
cat(" a path (X -> M):", round(results$estimates$a, 3), "\n")
cat(" b path (M -> Y):", round(results$estimates$b, 3), "\n")
cat(" c' path (X -> Y):", round(results$estimates$direct, 3), "\n")
cat(" Indirect effect:", round(results$estimates$indirect, 3), "\n\n")
cat("95% Confidence Intervals for Indirect Effect:\n")
cat(" DOP:", round(results$ci_dop, 3), "\n")
cat(" Monte Carlo:", round(results$ci_mc, 3), "\n")
cat(" Bootstrap:", round(results$ci_boot, 3), "\n\n")
cat("Effect Size:\n")
cat(" P_med:", round(results$pmed, 3), "\n\n")