Hi,
I have a Stata question that I was hoping you could help me with. I am
trying to bootstrap a stepwise Cox model. The aim is to see how many times
the predictor variables of interest enter the stepwise models in the
bootstrap samples. The idea being that if a variable enters most of the
stepwise models in the bootstrap samples, it is likely to be a strong
predictor of outcome. This was first described by Chen and George in 1985
and there have been several papers on it since. (Chen CH, George SL. The
bootstrap and identification of prognostic factors via Cox's proportional
hazards regression model. Stat Med. 1985 Jan-Mar;4(1):39-46. PMID: 3857702)
My problem is that stata runs the stepwise command on the original dataset
and then only reports the number of times these variables enter the model in
the bootstrapped datasets. It does not collect any statistics for those
variables that do not enter the stepwise model on the original dataset. If I
request a beta coefficient for a variable does not enter the stepwise model
on the original dataset it gives me an error (command 2 below).
Please let me know if you have any thoughts on how I can get around this or
if there is someone who could help me.
Thank you so much.
Kapil
command 1:
bs "sw stcox age gender caucasian ef qrs sxdurm nyha htn dm hchol
neversm fh afib lbbb vt pm aicd esrd na k cr betayn acearbyn digyn spiryn
loopyn bmi hr map ra rhcath_rvsp pam pcwp co lbbbyn, pr(0.05)" _b _se ,
reps(1000) saving(bootstrap)
command 2:
bs "sw stcox age gender caucasian ef qrs sxdurm nyha htn dm hchol
neversm fh afib lbbb vt pm aicd esrd na k cr betayn acearbyn digyn spiryn
loopyn bmi hr map ra rhcath_rvsp pam pcwp co lbbbyn, pr(0.05)" _b[age]
_b[gender] _b[caucasian] _b[ef] _b[qrs] _b[sxdurm] _b[nyha] _b[htn] _b[dm]
_b[hchol] _b[neversm] _b[fh] _b[afib] _b[lbbb] _b[vt] _b[pm] _b[aicd]
_b[esrd] _b[na] _b[k] _b[cr] _b[betayn] _b[acearbyn] _b[digyn] _b[spiryn]
_b[loopyn] _b[bmi] _b[hr] _b[map] _b[ra] _b[rhcath_rvsp] _b[pam] _b[pcwp]
_b[co] _b[lbbbyn] ] , reps(1000) saving(bootstrap)
ERROR MESSAGE:
[gender] not found
error in statistic: _b[gender]
r(111);
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/