Hi,
I am hopeful that someone can help me.
I am having trouble understanding how to plot a significant interaction while controlling for several covariates.
For example, I run the model:
regress y i.A##i.sex c.control1 i.control2 c.control3
I get a significant interaction between A and sex.
I then plot this graph via:
margins sex#A
marginsplot, x(A)
and all looks good (both lines match coefficient direction).
But then, I perform a sex stratified analysis and find that A is not associated with Y in either males or females. Simple effects however do show m/f differ in one condition.
My question is, what would be the best way to represent this result?
I then do:
regress y i.A##i.sex i.sex(c.control1 i.control2 c.control3)
and try:
margins child_sex, dydx(A)
margins sex#A
marginsplot, x(A)
and the coefficients match the sex-stratified analysis - but now there looks like there is no effect at all in one of the groups (the 95% CI are very wide) and the lines are parallel.
Any help would be much appreciated.
All the best,
Lucy
Related Posts with Graphs after margins with interaction and covariates
Populating month level data from annual level data for the same observationsI have a dataset which has both month level data and annual level data over a period of 10 years for…
Qqvalue: q-values the same as p-valuesHello, I am using Stata 15.1. I ran a GLM in svy, and then used parmest to generate an output datas…
Interpreting time-varying coefficients in a fixed effects regression using SEM (as in xtdpml)I've estimated a fixed effects model within a structural equation modeling (SEM) framework, inspired…
Difference between interaction term or subgroup analysis when introducing control variablesHi everybody I have a question. I am looking into the difference between public and outsourced empl…
Second minimum dateI have different date variables and want to find the second minimum date. That is when you order the…
Subscribe to:
Post Comments (Atom)
0 Response to Graphs after margins with interaction and covariates
Post a Comment