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
Perturb with MlogitHi All, I estimate a multinomial logit model with 10 independent variables. I suspect that there mi…
Counts in a long dataset taking into account other variables including timeHello, I have a very large dataset that includes people ("personid") who could have been seen at 4 …
Appending excel files - Error r(601)Hi. I am trying to append all excel files in a single folder into one big file, but the code below t…
Why does the asreg command give me values for the first observations of my sample even thought I specified a min?Hello everyone! I am using the asreg command to calculate betas using one year of daily data, but I…
Mixed-Effect Zero Inflated Negative Binomial model ??Hello, I have a study where I am evaluating the relationship between the total number of health care…
Subscribe to:
Post Comments (Atom)
0 Response to Postestimation following melogit
Post a Comment