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
0 Response to Standard errors from margins commands
Post a Comment