Hi all
I am running a 2-level random intercepts logistic regression model (using melogit) and would like to report predicted probabilities after running the model. I can do that easily enough and store them in a variable called full_prediction using
predict full_prediction, mu
But what I really want to be able to do is to dissect these predictions into a component due to the fixed part of the model and a component due to the random intercept. The command xb generates the linear predictor of the fixed portion of the model, so I thought that maybe
predict fixed_prediction, xb
would allow me to calculate the component due to the random intercept by subtraction.
As there are no random slopes in this model (only the intercept varies randomly), I expected that the component due to the random intercept would be the same for every case in the same higher level unit. But they weren't.
Not only that, in some cases they were outside of [0,1]; as were some of the predicted probabilities due to the fixed part of the model; i.e. those derived by
predict fixed_prediction, xb
Have I misunderstood something here?
Many thanks
John
Related Posts with Postestimation following melogit
Stata implementation of Conway's Game of LifeConway's Game of Life is a cellular automaton devised by John Conway in 1970, in which cells on an i…
3 dimensional panel clusteringHi, I have a 3 dimensional panel: country, firm, date. I use xtset countryfirm date. and I want to c…
Heckman selection modelHi, In my first stage selection model, a person can be selected by multiple companies, which leads t…
Unique IDs constant over multiple observations and variablesHello everyone, New to STATA and love the helpful community I've been seeing, any help will be much …
Difference in differences (DID) before and after an eventHi everyone, I'm new to stata. I was trying to do a diff-in-diff test for a list of firms before 200…
Subscribe to:
Post Comments (Atom)
0 Response to Postestimation following melogit
Post a Comment