To test whether there are statistically significant differences by treatment group assignment in the overall sample, I do the following:
Code:
quietly logistic y i.x i.sex margins, dydx(*) margins x, pwcompare
I assume this is correct, but I'd be grateful if somebody could confirm.
Now, I also want to test whether there are significant difference in treatment effects within certain subpopulations (e.g. within males and females).
First, I include an interaction term to my regression model (see code below), but I don't know how to proceed.
Code:
quietly logistic y i.x i.sex i.x#i.sex
Any help would be greatly appreciated.
0 Response to Test differences in average marginal effects within subgroups based on logistic regression model
Post a Comment