Hi Statalists,
I was wondering how to conduct a significance test to compare the difference in average marginal effects (AME) between two stratified samples. An example is as follows:
logit y i.x1 i.x2 if gender==1
margins,dydx(x1) asobserved vsquish
Average marginal effects Number of obs = 3,112
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 |
1 yes | .0743023 .0155001 4.79 0.000 .0439226 .1046819
------------------------------------------------------------------------------
logit y i.x1 i.x2 if gender==2
margins,dydx(x1) asobserved vsquish
Average marginal effects Number of obs = 4,347
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 |
1 yes | .0860667 .0147079 5.85 0.000 .0572398 .1148937
------------------------------------------------------------------------------
I wanted to test whether the AME of X1 for men (.0743023) and women (.0860667) are significantly different. How can I do this in STATA?
Thank you.
0 Response to comparing difference in average marginal effects (AME) between stratified samples
Post a Comment