Hi everyone,
I'm proposing a serial mediation model in Stata 16.0. The model uses complex sampling weights, so it requires the svy prefix. After searching online and on this forum, it appears that the best approach to test for significance of the indirect effect when using sampling weights is:
1. Use nlcom after running the SEM model
My model includes several control variables (modeled at each path, but eliminated here for clarity). My concern is that when I run the SEM model, the relationship between mediator2 and the DV is not significant.
Survey: Structural equation model Number of obs = 990
Number of strata = 6 Population size = 135,868,559
Number of PSUs = 990 Design df = 984
-------------------------------------------------------------------------------
| Linearized
| Coef. Std. Err. t P>|t| [95% Conf. Interval]
--------------+----------------------------------------------------------------
Structural |
mediator1 |
IV | .1898218 .0530235 3.58 0.000 .0857696 .2938739
_cons | .0778093 .0639975 1.22 0.224 -.047778 .2033966
------------+----------------------------------------------------------------
mediator2|
mediator1 | .097075 .0348129 2.79 0.005 .028759 .1653911
_cons | -.0149318 .0397547 -0.38 0.707 -.0929456 .063082
------------+----------------------------------------------------------------
DV |
mediator2 | -.1080093 .0944578 -1.14 0.253 -.2933711 .0773526
_cons | .0103036 .0602753 0.17 0.864 -.1079792 .1285865
------------+----------------------------------------------------------------
After running nlcom, the indirect effect is not significant (expected given the SEM results).
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1 | -.0019903 .0019534 -1.02 0.308 -.0058189 .0018383
------------------------------------------------------------------------------
However, after obtaining the bootstrapped estimates, the parameters suggest that the indirect effect is now significant
Bootstrap results Number of obs = 990
Replications = 5,000
command: bootmm
_bs_1: r(indtotal)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_bs_1 | -.0036321 .0016421 -2.21 0.027 -.0068506 -.0004135
------------------------------------------------------------------------------
Am I using the right approach here? The significant indirect effect is unexpected given the lack of significance between mediator2 and the DV. I know that there is a medsem program, but it is unclear if this program can be used with sampling weights and for testing serial mediation.
Thank you for your help!
I'm proposing a serial mediation model in Stata 16.0. The model uses complex sampling weights, so it requires the svy prefix. After searching online and on this forum, it appears that the best approach to test for significance of the indirect effect when using sampling weights is:
1. Use nlcom after running the SEM model
nlcom _b[mediator1:IV]*_b[mediator2:mediator1] *_b[DV:mediator2]2. Obtain bootstrapped estimates
capture program drop bootmm
program bootmm, rclass
syntax [if] [in]
sureg (mediator1 IV)(mediator2 mediator1)(DV mediator2) `if' `in'
return scalar indtotal = _b[mediator1:IV]*_b[mediator2:mediator1] *_b[DV:mediator2]
end
bootstrap r(indtotal), bca reps(5000): bootmm
My model includes several control variables (modeled at each path, but eliminated here for clarity). My concern is that when I run the SEM model, the relationship between mediator2 and the DV is not significant.
Survey: Structural equation model Number of obs = 990
Number of strata = 6 Population size = 135,868,559
Number of PSUs = 990 Design df = 984
-------------------------------------------------------------------------------
| Linearized
| Coef. Std. Err. t P>|t| [95% Conf. Interval]
--------------+----------------------------------------------------------------
Structural |
mediator1 |
IV | .1898218 .0530235 3.58 0.000 .0857696 .2938739
_cons | .0778093 .0639975 1.22 0.224 -.047778 .2033966
------------+----------------------------------------------------------------
mediator2|
mediator1 | .097075 .0348129 2.79 0.005 .028759 .1653911
_cons | -.0149318 .0397547 -0.38 0.707 -.0929456 .063082
------------+----------------------------------------------------------------
DV |
mediator2 | -.1080093 .0944578 -1.14 0.253 -.2933711 .0773526
_cons | .0103036 .0602753 0.17 0.864 -.1079792 .1285865
------------+----------------------------------------------------------------
After running nlcom, the indirect effect is not significant (expected given the SEM results).
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1 | -.0019903 .0019534 -1.02 0.308 -.0058189 .0018383
------------------------------------------------------------------------------
However, after obtaining the bootstrapped estimates, the parameters suggest that the indirect effect is now significant
Bootstrap results Number of obs = 990
Replications = 5,000
command: bootmm
_bs_1: r(indtotal)
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_bs_1 | -.0036321 .0016421 -2.21 0.027 -.0068506 -.0004135
------------------------------------------------------------------------------
Am I using the right approach here? The significant indirect effect is unexpected given the lack of significance between mediator2 and the DV. I know that there is a medsem program, but it is unclear if this program can be used with sampling weights and for testing serial mediation.
Thank you for your help!
Comment