Below is the command I am using to calculate the AUC for my prediction models in imputed datasets.
I am searching for a STATA command similar to "roctab: depvar p, detail" for imputed datasets.
Any suggestions for STATA command to calculate the sensitivity and specificity (at different cut-offs) for imputed datasets?
cap program drop eroctab
program eroctab, eclass properties(mi)
version 12.0
args refvar
capture drop p
logistic `refvar' x1 x2 x3
predict p
roctab `refvar' p
tempname b V
mat `b' = r(area)
mat `V' = r(se)^2
local N = r(N)
mat colnames `b' = AUC
mat colnames `V' = AUC
mat rownames `V' = AUC
ereturn post `b' `V', obs(`N')
ereturn local cmd "eroctab"
ereturn local title "ROC area"
end
mi estimate, cmdok: eroctab refvar
Thank you!!!
Related Posts with Multiple imputation STATA command
Including a ratio coefficient of other coefficients in the regressionDear All, I have been trying to run analysis using the paper of Acemoglu et al. (2008) about the ass…
Identify a segment of a stringHi, I want to assign a binary code to each column, 1 if it contains information from the first row …
no observations to perfom with the code Code: asdoc cor gini_k decile incdegini eta agesquared ncomp married self_employed smallcity disav…
mata analysis - Can someone please help me with this mata analysis *Data is about: The effect of Maternal Lipid Levels on Pregnant Women Without Complication in Devel…
to get away from command ab is unrecognizedHi my question is simple, i get command ab is unrecognized how can I get away from this …
Subscribe to:
Post Comments (Atom)
0 Response to Multiple imputation STATA command
Post a Comment