Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Retreive standard error from the fixed portion of linear prediction after MCMC algorithm using "bayes" prefix

    Dear all,

    I am running a multilevel random intercept model for a binary outcome (risk: high vs. low) using MCMC algorithm implemeted through "bayes" prefix. After code execution, I tried to use the command "bayespredict" to get the standard error (SE) of the fixed portion linear prediction (just like after running "melogit" model, you can use "predict" to get the prediction of the fixed linear portion and its SE). However, the command "bayespredict" is not compatible with "bayes: melogit". I appreciate any guidance on how to derive SE for the fixed portion linear prediction.

    My code is:

    bayes, saving(m1.ster, replace) rseed(12345): melogit risk_cat i.age_bi i.gender i.preg_smk_bi || stratum:, or baselevels

    Thanks in advance!

    Best,
    Mengmeng

  • #2
    Originally posted by Mengmeng Li View Post
    . . . the command "bayespredict" is not compatible with "bayes: melogit"
    I'm not so sure about deriving the "SE for the fixed portion linear prediction", but your model has only two levels, which can be fit with xtlogit, and according to its help file bayespredict is available after bayes: xtlogit.

    Comment

    Working...
    X