Announcement

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

  • Pseudo R2 for MI Ologit

    I have tried applying the commands listed in on the two forum posts https://www.statalist.org/forums/for...ple-imputation and https://www.statalist.org/forums/for...t keep getting. I used the command:
    Code:
    local vars "i.female i.aframer i.asian i.latino i.other c.pared i.fedgrant i.sf_loansyest1"
    noi mi estimate, or saving(miest, replace): ologit arts `vars', cluster(schoolid)
    qui mi query
    local M=`r(M)'
    scalar r2=0
    scalar cstat=0
    qui mi xeq 1/`M': ologit arts `vars'; scalar r2=r2+e(r2_p); lroc, nog; scalar cstat=cstat+r(area)
    scalar r2=r2/`M'
    scalar cstat=cstat/`M'
    noi di "Pseudo R=squared over imputed data = " r2
    noi di "C statistic over imputed data = " cstat
    and received the error message:
    Code:
     qui mi xeq 1/`M': ologit arts `vars'; scalar r2=r2+e(r2_p); lroc, nog; scalar cstat=cstat+r(area)
    last estimates not found
    I have tried the [CODE ]local M=`r(M)'[/CODE] with and without the quote around the r(M)

    I had the command structure work for me last week on a series of logits, but for some reason, the ologit is not giving me an output.

    Thanks for any help!
Working...
X