Hi,
I am wondering if someone can help me, as have been having some issues with plotting a figure to match the results from a post estimation margins command.
I have the following model:
regress y i.sex##c.age, vce(cluster studyid)
I am accounting for the fact that results are from 17 different studies (study id).
From this model, I obtain a significant interaction effect.
I then want to look at the outcome (y) at all levels of age, as therefore run:
margins sex, at(xcage=(7(1)18)), vce(unconditional)
(which also adjust the SE for the 17 clusters)
I then obtain a table with margins and SE that I would like to plot with:
marginsplot, horizontal recast(scatter) xline(119, lcolor(red))
However, the CIs for each age (by sex) overlap significantly (i.e. I was expecting sex differences at each age as I ran):
margins, dydx(sex) at(xcage=(7(1)18)) vce(unconditional)
...which shows most male/female differences are significant at the <0.001 level.
Therefore, my question is, why do the adjusted means (or the unconditional dy/dx / standard errors) do not match up to the marginal effects command?
Thank you in advance,
Lucy
Related Posts with Standard errors from margins commands
Simulating data for logistic regression with categorical variablesDear Statalists, I would like to test the effect of sample size on standard errors of interaction e…
SYS-GMM: Problem of overidentifying restrictionsHello everybody, I want to analyse determinants of corporate leverage in the past twenty years (wit…
(Easy) Quadratic term of variable in regression: Joint hypothesis testHello, when a variable enters an estimation model in a quadratic term as well, there are two coeffic…
How do do multilevel multinomial regression for multiply imputed data?Hello Everyone, I'm doing a project on how high school racial segregation may impact racial/ethnic …
Generate a new variable based on character ("/") of another variable Code: +-------------------------------------------+ | …
Subscribe to:
Post Comments (Atom)
0 Response to Standard errors from margins commands
Post a Comment