Hello,
I would be grateful if you could explain to me why I get different results from margins when I use the at() option and when I use the subpop(if...) option.
I am running logistic regression with four dummy variables as predictors (and their interactions). My syntax is
margins r.dummy1, at (dummy2 = 1)
margins, dydx(dummy1) subpop(if dummy2==1)
I am trying to find out how the effect of dummy1 changes the probability of the outcome but only for records who are '1' on dummy 2.
I have read various materials and I thought it is done with the at() option, but then I stumbled upon the subpop(if..) option and now I am well confused.
I want to get Average Marginal Effects rather than Marginal Effects at the Means / marginal effects at representative values.
Many thanks in advance!
I would be grateful if you could explain to me why I get different results from margins when I use the at() option and when I use the subpop(if...) option.
I am running logistic regression with four dummy variables as predictors (and their interactions). My syntax is
margins r.dummy1, at (dummy2 = 1)
margins, dydx(dummy1) subpop(if dummy2==1)
I am trying to find out how the effect of dummy1 changes the probability of the outcome but only for records who are '1' on dummy 2.
I have read various materials and I thought it is done with the at() option, but then I stumbled upon the subpop(if..) option and now I am well confused.
I want to get Average Marginal Effects rather than Marginal Effects at the Means / marginal effects at representative values.
Many thanks in advance!
Comment