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
How to minimize identical successive observations ?Dear all, I'm working on a social policy for a job center. We are sending job recommendations to jo…
GARCH regressions for panels using foreachHi, 1. I want to estimate my risk measures using bi-variate diagonal GARCH (1,1) model (DVECH) for …
Non parametric estimation of Regression Discontinuity analysis in Stata(rdrobust)I use the following code for non parametric estimation: rdrobust y v,c(0) kernel(uni) bwselect(mser…
Outline totals within Tab of 2 variables Hi there, I have a dataset where I`m looking at stores and the products in these stores. The stor…
Instrumental Variable using Panel Data with Binary Endogenous VariableDear all, Can someone let me know how to implement a procedure similar to XTIVREG but with a binary…
Subscribe to:
Post Comments (Atom)
0 Response to how to calculate pseudo-R2 using imputed data in a multinomial logistic regression
Post a Comment