I found the following code in this forum to get the pseudo R² for imputed data:
Code:
local rhs "armg2 armg3 tbsaburn20 tbsaburn21" noi mi estimate, or saving(miest, replace): logistic hodc `rhs', vce(cluster site) qui mi query local M=r(M) scalar r2=0 scalar cstat=0 qui mi xeq 1/`M': logistic hodc `rhs'; 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
Code:
local rhs "geschl_n alter_n ethnieend2 schform sozhilf_n selcon bsiagg emp hiesel sozdep eltgew herumf rexnied rexmut rexvat rexle rexfr reakmut_pos reakvat_pos reakle_pos reakfr_pos aus_mit" noi mi estimate, or saving(miest, replace): meqrlogit taetaus `rhs', or || klcode: , qui mi query local M=r(M) scalar r2=0 scalar cstat=0 qui mi xeq 1/`M': meqrlogit taetaus `rhs', or || klcode: ,; 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
Thanks in advance,
Yvonne
0 Response to Pseudo R² for meqrlogit using mi estimate
Post a Comment