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
Syntax error r(198) when trying to loop an rdrobust command in a matrixDear stata forum, I am writing a paper on the causal effect of compulsory school reforms, expanding…
How to assign the same value to all members of a group if a condition on a certain variable occures AT LEAST once in the same groupHi Statalist experts, I would need a little help. I'm working with a dataset containing the followi…
Plotting interaction on latent variable after sem/gsemHi Statalist - Longtime reader, first-time poster. I am running an sem/gsem where the latent has 4 i…
File Association problem when changing from Stata 15 to 16 on WIndows 10Hello Stata fellows, I just recently tried to upgrade my Stata 15 to Stata 16 (both installed on a …
Merging DatasetsCan I merge two datasets one in long format and one in wide format with each other? Thanks …
Subscribe to:
Post Comments (Atom)
0 Response to comparing difference in average marginal effects (AME) between stratified samples
Post a Comment