My goal is to compare the AMEs between two subpopulations of my sample in a logit model. However, there are two different moments in my analysis I can think of on where I can divide my sample into those two subpopulations, leading to very different results.
In the example below y would be my binary dependent variable; a and b are covariates and subpop is a dummy, dividing my sample into those two subgroups.
Possibility 1:
forval i=0/1 {
logit y a b if subpop==`i'
margins, dydx(a b)
}
Possibility 2:
forval i=0/1 {
logit y a b i.subpop
margins if rich==`i', dydx(a b)
}
I know for the latter code, the over() and the subpop() command can be used as well, which does not change the results with my data. What does change the magnitude of the effects of a and b on y tremendously is whether I divide my population before the logit command is executed or after the logit command is executed (i.e. before the margins command is executed). So my question is, which option is the “correct” one or rather how do the two options differ in the interpretation of results?
Thanks a lot in advance!
Related Posts with When to divide in subpopulations, using the margins command (AME) in a logit model?
Sum from multiple variablesPlease advise syntax for obtaining the total from multiple variables (T1worst_ethos90 T2worst_ethos9…
Difference-in-Difference with a series of cross section data*Hello, everyone! I am fairly bad at Stata and it's been some time since I attended any econometrics…
Balance test with categorical variablesDear Statalist - Community, I conduct an analysis using a difference-in-differences estimation stra…
Troubles with Propensity score matching and synth_runnerHello! I'm fairly new to stata so there are a few things that I am not sure how to do. I am currentl…
markdown headersDear All, working with markdown command, I am puzzled why the headers, such as Code: # Example are…
Subscribe to:
Post Comments (Atom)
0 Response to When to divide in subpopulations, using the margins command (AME) in a logit model?
Post a Comment