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?
 dependent variable with gap in a panel data with repeated time valuesHello Statalist,
I have panel data with repeated time values. The reason is that there are more tha… dependent variable with gap in a panel data with repeated time valuesHello Statalist,
I have panel data with repeated time values. The reason is that there are more tha…
 how to draw multi-classification ROC curve use statahello everyone ! i want to test the diagnostic value of a b c d. and the gold standard is multi-clas… how to draw multi-classification ROC curve use statahello everyone ! i want to test the diagnostic value of a b c d. and the gold standard is multi-clas…
 Why Stata graphs have different margins?Dear Statalists,
I am plotting my estimated coefficients and its confidence intervals. But I found t… Why Stata graphs have different margins?Dear Statalists,
I am plotting my estimated coefficients and its confidence intervals. But I found t…
 how to draw multi-classification ROC curve use statahello everyone ! i want to test the diagnostic value of a b c d. and the gold standard is multi-clas… how to draw multi-classification ROC curve use statahello everyone ! i want to test the diagnostic value of a b c d. and the gold standard is multi-clas…
 Reshaping my datasetHello,
I am having trouble reshaping my dataset. I only want two columns: descriptive statistics (i… Reshaping my datasetHello,
I am having trouble reshaping my dataset. I only want two columns: descriptive statistics (i…
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