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

From |
"Daniel Waxman" <dan@amplecat.com> |

To |
<statalist@hsphsun2.harvard.edu> |

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

Date |
Fri, 12 Oct 2007 22:41:31 -0400 |

Uh oh. This isn't right at all. At least this has evolved into a more Stataish question... Basically, rather than generate the variable "rr" which contains the relative risk at all values of the continuous predictor "zlog", I would like to bootstrap the relative risk at one discrete value of "zlog", with other variables (some of which are continuous, some of which are dichotomous, not shown in the previous example) adjusted in such a way that they reflect their actual distribution in the data. If anybody could point me in the right direction, I'd be most grateful. (and I'd shut up). Daniel -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Daniel Waxman Sent: Friday, October 12, 2007 9:32 PM To: statalist@hsphsun2.harvard.edu Subject: RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods? For the record, I realized that I was bootstrapping the wrong thing. Here is (a minimally simplified version) of what I meant to do ... . boot rr_univ=(invlogit($mb_notindicated_predictors)/invlogit($mbneg_predictors)), /* */ reps($reps) saving(multiboot_notneg_$i,replace): /* */ logistic outcome zlog zero mbpos int_zlog_pos . estat bootstrap (no more red 'x's) So the question was ... how to explain that these CIs appear so much better than those generated as follows? . logistic outcome zlog zero mbpos int_zlog_pos . predictnl rr=invlogit($mbpos_predictors)/invlogit($mbneg_predictors),se(se_rr) . gen ub = rr + 1.96*se_rr . gen lb = rr - 1.96*se (and is it reasonable to assume that with a whole lot of reps, the bias-corrected bootstrapped CIs are in fact better?) Where: . global mbpos_terms _b[_cons] + _b[int_zlog_pos]*`constant' + /* */ _b[int_zero_pos] + _b[zlog]*`constant' + _b[zero] + _b[mbpos] . global mbneg_terms _b[_cons] + _b[zlog]*`constant' + _b[zero] Perhaps the question is more clear now (?) 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/ No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.14.8/1066 - Release Date: 10/12/2007 11:10 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.14.8/1066 - Release Date: 10/12/2007 11:10 AM * * 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/

**References**:**RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods?***From:*"Daniel Waxman" <dan@amplecat.com>

- Prev by Date:
**st: Re: Why is there a fixed alpha for the P>|z| estimated with poisson?** - Next by Date:
**Re: st: New Resource for Using R with Stata** - Previous by thread:
**RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods?** - Next by thread:
**RE: st: confidence intervals for ratio of predictions-- bootstrap vs. parametric methods?** - Index(es):

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