Hi all,
I am using the margins command to predict probabilities. I ran 5 separate logistic regression for each subgroup (block) of my sample.
foreach blo of numlist 1(1)5 {
logit y x1 x2 x3 x4 if block==`blo'
qui margins if block==`blo', at((mean) _all x1=(1(1)10)) over(x2))
.....
}
My question is: for the part at((mean) _all x1=(1(1)10)) over(x2)) , is margins predicting the probabilities at the means of covariates x3 and x4 within each block (i.e. block-specific means), or at the means of x3 and x4 of the whole sample? If it is the latter, is there any efficient way of telling Stata to do it at the block-specific means of x3 and x4?
Thank you very much!
Related Posts with margins at((mean) _all)
Reshaping Datastream DataHello community. first of all I would like to thank you for the inclusion in this really instructive…
Complex survey settingsHi, I am trying to set-up a complex survey data set in Stata and Mplus so that they have the same s…
Superscript and subscriptDear Stata users, I have a variable with both superscript and subscript. When I wrote both superscr…
'No observations' errorDear all, I'm trying to conduct a unit root test to my variables using the following code: Code: …
Comparison of predicted values after OLS regressionDear all, I am interested in predicted values after an OLS regression. Moreover, I am curious how t…
Subscribe to:
Post Comments (Atom)
0 Response to margins at((mean) _all)
Post a Comment