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.
Related Posts with comparing difference in average marginal effects (AME) between stratified samples
Plot predictions after xthregHello Statalist, I have experimental panel data und used xthreg to estimate a threshold function (w…
ttest result and asdoc table not agree.Hi all, I am getting problem with results in asdoc table, p-values in the Word file not agree with …
installing an ado fileCan anyone guide me on how to install an ado file? I'm using stata 14.2 in Mac. Here is the file htt…
Variables not working togetherHello, I am relatively new to Stata and I am trying to run a regression and my whitedummy variable …
wrapping up using lines of codes in a loopHi, How can I wrap up the below code in a loop? Best, Nader gen n=_n gen sample=_n replace sam…
Subscribe to:
Post Comments (Atom)
0 Response to comparing difference in average marginal effects (AME) between stratified samples
Post a Comment