Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods?


From   "Daniel Waxman" <[email protected]>
To   [email protected]
Subject   RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods?
Date   Sun, 14 Oct 2007 17:03:37 -0400

Not sure about list etiquette regarding answering one's own questions,
but for thread-reading posterity, the answer of how to how to do the
bootstrap that I am interested in appears to be given in the following
reference (in particular, "marginal standardization"):

Berlin JA, Margolis DJ, Localio AR.  Relative risks and confidence
intervals were easily computed indirectly from multivariable logistic
regression.  Journal of Clinical Epidemiology  2007; 60: 874-882
(the reference has appeared previously on this list).

With interaction terms, this works out to:


. global Xpos _b[_cons] + _b[int_zlog_pos]*zlog  + ///
 _b[int_zero_pos]*zero + _b[zlog]*zlog  + _b[zero]*zero + _b[mbpos]
 	
. global Xneg _b[_cons] + _b[zlog]*zlog + _b[zero]*zero
	

. program boot_posneg, rclass	
. logistic outcome zlog zero mbpos int_z*
. tempvar rrt
. gen `rrt'=invlogit(($Xpos))/invlogit(($Xneg)) if e(sample)
. qui sum `rrt' ,meanonly
. return scalar rr=r(mean)
. end


. bootstrap rr_univ=r(rr), reps(1000): boot_posneg
. estat bootstrap

Which, I believe, provides the 95% CIs for the relative risk
for condition mbpos=1 vs. mbpos=0 in the population as otherwise specified.

(this is somewhat different from what I said I wanted, but it does the job).


Daniel
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index