Dear all,
I would like to calculate the pseudo-R2 for my multinomial logistic regression in multiple imputed data.
This is my code for imputing data and running the regression(s):
mi set mlong
mi register regular BROWNISH_MULTI GREENISH_MULTI GREEN_MULTI
mi register imputed BERD_AUTO CAR_SALES Log_PATENT_STOCK GREEN_GOV_RD REN_EN_PUB_RD FOSS_FUEL_PUB_RD BEV_SALES EPS GDP_PC
mi impute mvn BERD_AUTO CAR_SALES Log_PATENT_STOCK GREEN_GOV_RD REN_EN_PUB_RD FOSS_FUEL_PUB_RD BEV_SALES EPS GDP_PC = BROWNISH_MULTI, add(20)
mi estimate: mlogit BROWNISH_MULTI l(1).(BERD_AUTO CAR_SALES Log_PATENT_STOCK GREEN_GOV_RD REN_EN_PUB_RD FOSS_FUEL_PUB_RD BEV_SALES EPS GDP_PC), base(0)
I have read in a Statalist post that a possible solution to get the pseudo R2 after mi estimate is the following:
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 I don't understand exactly how to adapt this code to my needs (e.g. where to plug my variables).
Could you provide me any help, please? Many thanks in advance
Anna
Related Posts with how to calculate pseudo-R2 using imputed data in a multinomial logistic regression
Question on tsfilterI am a beginner with tsfilter in stata and have strange behavior when trying. I have a dataset with …
Question about multivariate regression analysisDear colleagues, Good morning. I would like to ask about multivariate regression analysis. I researc…
Help needed with replicating a studyHi all, I'm replicating the study of Barua et al. called Earnings Management Using Discontinued Ope…
Negative Spatial autocorrelationDear All, I hope I can get a suggestion from someone in the field of spatial econometrics, although…
Graph the marginal effect of x1 on y (y-axis) against x2 (x-axis)?Dear All, Suppose I run the following regression: Code: // ssc install interflex, interactplot sysu…
Subscribe to:
Post Comments (Atom)
0 Response to how to calculate pseudo-R2 using imputed data in a multinomial logistic regression
Post a Comment