Hello
I would like to create a graph of predicted probabilities including both fixed and random effects plus 95%CI, similar to that at the following link (no 95% CI here):
https://stats.idre.ucla.edu/stata/fa...-in-xtmelogit/
I used the –meqrlogit- instead of –xtmelogit-. The 3-level null model (no independent variable) is:
.meqrlogit binaryoutcome || region: || hospital:
//// predicted probability for hospital
.predict re_hosp, reffects relevel(hospital) // linear predictor for the random effects
.predict fe_hosp, xb // linear predictor for the fixed effects
.gen pred_prob_hosp = 1/(1+exp(-1*(re_hosp+fe_hosp))) // compute probabilities using both fixed and random components for hospital
//// standard errors
.predict re_se_hosp, reses relevel(hosptial)
.predict fe_se_hosp, stdp
My questions are:
Thank you,
Lei
I would like to create a graph of predicted probabilities including both fixed and random effects plus 95%CI, similar to that at the following link (no 95% CI here):
https://stats.idre.ucla.edu/stata/fa...-in-xtmelogit/
I used the –meqrlogit- instead of –xtmelogit-. The 3-level null model (no independent variable) is:
.meqrlogit binaryoutcome || region: || hospital:
//// predicted probability for hospital
.predict re_hosp, reffects relevel(hospital) // linear predictor for the random effects
.predict fe_hosp, xb // linear predictor for the fixed effects
.gen pred_prob_hosp = 1/(1+exp(-1*(re_hosp+fe_hosp))) // compute probabilities using both fixed and random components for hospital
//// standard errors
.predict re_se_hosp, reses relevel(hosptial)
.predict fe_se_hosp, stdp
My questions are:
- Does predict fe_se_hosp, stdp give the correct fixed standard error?
- How to combine the re_se_hosp and fe_se_hosp?
Thank you,
Lei
Comment