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

From |
Michael Ingre <Michael.Ingre@ipm.ki.se> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RRR with CI from logit model |

Date |
Wed, 3 Nov 2004 09:38:19 +0100 |

On 2004-11-02, at 19.02, Leonelo Bautista wrote:

I understand you can get the log of the risk for each group (lnR1 and lnR2,This is a very neat solution. I will try it today and see how it performs. To me it looks like a feasible "bootstrap" approach. But then, I'm not a statistician. I think though that the code needs to be slightly modified to describe risks:

for example) and their corresponding standard errors (se_lnR1 and se_lnR2).

Consider the following approach:

a) Get a large number of values from the distribution of the risk in each

group using the -uniform- function:

gen A = lnR1 + se_lnR1 * invnorm(uniform())

gen B = lnR2 + se_lnR2 * invnorm(uniform())

b) Calculate the relative risk using A and B

gen rrisk=A/B

c) get the values corresponding to the 0.025 and 0.975 percentiles of the

distribution of "rrisk"

local l025 = .025 * _N

local u025 = .975 * _N

These two values should correspond to a 95% confidence interval for the

relative risk. Maybe other members of the list could comment on the

appropriateness of this approach.

I hope this help,

a)

gen random_a = log_odds_se * invnorm(uniform())

gen random_b = log_odds_se * invnorm(uniform())

gen risk_a = exp(log_odds_a + random_a) / (1 + exp(log_odds_a + random_a))

gen risk_b = exp(log_odds_b + random_b) / (1 + exp(log_odds_b + random_b))

Michael

*

* 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: RRR with CI from logit model***From:*Leonelo Bautista <lebautista@wisc.edu>

- Prev by Date:
**RE: st: RRR with CI from logit model** - Next by Date:
**RE: st: Equality of distributions** - Previous by thread:
**RE: st: RRR with CI from logit model** - Next by thread:
**RE: st: RRR with CI from logit model** - Index(es):

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