Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 <>
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 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"


Roland Andersson
Jönköping, Sweden

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index