Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Combine bootstrapped results of imputed data - does this work?


From   roland andersson <rolandersson@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Combine bootstrapped results of imputed data - does this work?
Date   Tue, 6 Dec 2011 10:41:48 +0100

Dear Statalist

I have constructed a clinical diagnostic score. I want to analyse the
bias corrected ROC area of the score by bootstrapping. The problem is
that I had missing values in the original data and have therefore used
multiple imputation. So I want to use bootstrapping for analysing the
the area in 20 imputed datasets.

I do not know how to combine the bootstrapped ROC area and SE. I found
this useful program
http://www.stata.com/support/faqs/stat/mi_combine.html which I adapted
for bootstrapping (see below).

My command is
. mi estimate, cmdok: ebootstraproctab appendicitdgn  clinicalscore

The program produces results, but I want to be sure that the produced
results are correct, ie represents the combined bootstrapped results
from 20 imputed datasets.

All comments are wellcome.


"cap program drop ebootsraproctab
program ebootstraproctab, eclass
       version 11.0
       /* Step 1: perform ROC analysis */
       args refvar classvar
       bootstrap r(area) r(se): roctab  `refvar' `classvar'

       /* Step 2: save estimate and its variance in temporary matrices*/
       tempname b V
       mat `b' = _b[_bs_1]
       mat `V' = _b[_bs_2]^2
       local N =e(N)

       /* Step 3: make column names and row names consistent*/
       mat colnames `b' = AUC
       mat colnames `V' = AUC
       mat rownames `V' = AUC

       /*Step 4: post results to e()*/
       ereturn post `b' `V', obs(`N')
       ereturn local cmd "ebootstraproctab"
       ereturn local title "ROC area"

end"

Roland Andersson
Jönköping, Sweden

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index