The three regression models:
Model 1 estimates the overall effect of X on Y
Model 2 estimates the partial effects of X and M on Y
Model 3 estimates the effect of X on M
If the following conditions were met, mediation was assumed to hold:
##
## Attaching package: 'psych'
## The following object is masked from 'package:lavaan':
##
## cor2cov
## vars n mean sd median trimmed mad min max range skew kurtosis
## Dep 1 500 -0.02 1.06 0.01 -0.03 1.10 -3.10 3.33 6.43 0.06 -0.02
## PR 2 500 -0.04 1.01 -0.06 -0.05 1.01 -3.28 2.80 6.09 0.05 0.03
## Agg 3 500 0.00 0.99 -0.03 0.01 0.91 -3.88 2.56 6.44 -0.18 0.23
## se
## Dep 0.05
## PR 0.05
## Agg 0.04
## lavaan 0.6-5 ended normally after 12 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 5
##
## Number of observations 500
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Model Test Baseline Model:
##
## Test statistic 221.854
## Degrees of freedom 3
## P-value 0.000
##
## User Model versus Baseline Model:
##
## Comparative Fit Index (CFI) 1.000
## Tucker-Lewis Index (TLI) 1.000
##
## Loglikelihood and Information Criteria:
##
## Loglikelihood user model (H0) -1343.461
## Loglikelihood unrestricted model (H1) -1343.461
##
## Akaike (AIC) 2696.923
## Bayesian (BIC) 2717.996
## Sample-size adjusted Bayesian (BIC) 2702.125
##
## Root Mean Square Error of Approximation:
##
## RMSEA 0.000
## 90 Percent confidence interval - lower 0.000
## 90 Percent confidence interval - upper 0.000
## P-value RMSEA <= 0.05 NA
##
## Standardized Root Mean Square Residual:
##
## SRMR 0.000
##
## Parameter Estimates:
##
## Information Expected
## Information saturated (h1) model Structured
## Standard errors Standard
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## Dep ~
## PR 0.319 0.046 6.925 0.000
## Agg 0.250 0.047 5.294 0.000
## PR ~
## Agg 0.444 0.041 10.760 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Dep 0.887 0.056 15.811 0.000
## .PR 0.834 0.053 15.811 0.000
## Registered S3 methods overwritten by 'huge':
## method from
## plot.sim BDgraph
## print.sim BDgraph
## lavaan 0.6-5 ended normally after 12 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 5
##
## Number of observations 500
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Parameter Estimates:
##
## Information Expected
## Information saturated (h1) model Structured
## Standard errors Standard
##
## Regressions:
## Estimate Std.Err z-value P(>|z|)
## Dep ~
## PR (b) 0.319 0.046 6.925 0.000
## Agg 0.250 0.047 5.294 0.000
## PR ~
## Agg (a) 0.444 0.041 10.760 0.000
##
## Variances:
## Estimate Std.Err z-value P(>|z|)
## .Dep 0.887 0.056 15.811 0.000
## .PR 0.834 0.053 15.811 0.000
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|)
## ind 0.142 0.024 5.823 0.000
## lavaan 0.6-5 ended normally after 12 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 5
##
## Number of observations 500
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Parameter Estimates:
##
## Standard errors Bootstrap
## Number of requested bootstrap draws 1000
## Number of successful bootstrap draws 1000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## Dep ~
## PR (b) 0.319 0.044 7.212 0.000 0.235 0.406
## Agg 0.250 0.045 5.570 0.000 0.159 0.338
## PR ~
## Agg (a) 0.444 0.045 9.821 0.000 0.352 0.533
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .Dep 0.887 0.058 15.379 0.000 0.772 0.999
## .PR 0.834 0.051 16.312 0.000 0.733 0.933
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## ind 0.142 0.024 5.922 0.000 0.097 0.193
\[Total = a*b + c\]
## lavaan 0.6-5 ended normally after 12 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 5
##
## Number of observations 500
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Parameter Estimates:
##
## Standard errors Bootstrap
## Number of requested bootstrap draws 1000
## Number of successful bootstrap draws 1000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## Dep ~
## PR (b) 0.319 0.045 7.118 0.000 0.228 0.403
## Agg (c) 0.250 0.045 5.505 0.000 0.161 0.340
## PR ~
## Agg (a) 0.444 0.044 10.012 0.000 0.359 0.529
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .Dep 0.887 0.060 14.704 0.000 0.771 1.008
## .PR 0.834 0.052 15.987 0.000 0.735 0.938
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## ind 0.142 0.024 5.827 0.000 0.095 0.193
## total 0.392 0.043 9.204 0.000 0.309 0.475
## lavaan 0.6-5 ended normally after 12 iterations
##
## Estimator ML
## Optimization method NLMINB
## Number of free parameters 5
##
## Number of observations 500
##
## Model Test User Model:
##
## Test statistic 0.000
## Degrees of freedom 0
##
## Parameter Estimates:
##
## Standard errors Bootstrap
## Number of requested bootstrap draws 1000
## Number of successful bootstrap draws 1000
##
## Regressions:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## Dep ~
## PR (b) 0.319 0.045 7.118 0.000 0.228 0.403
## Agg (c) 0.250 0.045 5.505 0.000 0.161 0.340
## PR ~
## Agg (a) 0.444 0.044 10.012 0.000 0.359 0.529
## Std.lv Std.all
##
## 0.319 0.306
## 0.250 0.234
##
## 0.444 0.434
##
## Variances:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## .Dep 0.887 0.060 14.704 0.000 0.771 1.008
## .PR 0.834 0.052 15.987 0.000 0.735 0.938
## Std.lv Std.all
## 0.887 0.790
## 0.834 0.812
##
## Defined Parameters:
## Estimate Std.Err z-value P(>|z|) ci.lower ci.upper
## ind 0.142 0.024 5.827 0.000 0.095 0.193
## total 0.392 0.043 9.204 0.000 0.309 0.475
## Std.lv Std.all
## 0.142 0.132
## 0.392 0.366
Note. *=significant at p<.05
Results
\[\frac{indirect}{total}\]
However, important to be aware of limitations:
Tricky interpretation if there are a mix of negative and positive effects involved