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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Maarten Buis <[email protected]> |

To |
[email protected] |

Subject |
Re: st: How to test the significance of a ratio of two correlated odds ratios in Stata |

Date |
Mon, 5 Sep 2011 09:50:08 +0200 |

On Mon, Sep 5, 2011 at 1:18 AM, Tiago V. Pereira wrote: > I would like to obtain the ratio of two odds ratios from a simple logistic > regression model. <snip> > Specifically, what I looking for is the ratio of OR2 to OR1 (i.e. test if > this ratio is statistically significant from 1), where: > > OR2 = odds ratio for covariate ==2 vs covariate ==0 > OR1 = odds ratio for covariate ==1 vs covariate ==0 I would do this by creating my own dummy variables. Lets say that 0 is a placebo, and 1 and 2 are different treatments. I would create one dummy that is 0 when placebo and 1 when any treatment and one dummy that is 0 when placebo or treatment 1 and is 1 when treatment 2. If you add those two dummies to your model than the "odds ratio" reported by -logit- is actually the ratio of odds ratios you are looking for. *---------------------- begin example ------------------- clear set obs 5000 set seed 7654321 *generates a categorical covariate 0,1,2 gene covariate = round(runiform()*2) gen byte treated = covariate > 0 & covariate < . gen byte group2 = covariate == 2 if covariate < . * generates a 1/0 disease status, 1 = disease,0=healthy * baseline odds is .10 diseased per healthy individual * getting any treatment decreases that odds by (1-.6)*100) = -60% * this decrease is (1-.8)*100% = -20% stronger is you get treatment2 gene status = runiform() < invlogit(ln(.10) + ln(.6)*treated + ln(.8)*group2) * estimate that model gen byte baseline = 1 logit status treated group2 baseline, or nocons *---------------- end example ------------------------ (For more on examples I sent to the Statalist see: http://www.maartenbuis.nl/example_faq ) Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:

**References**:**st: How to test the significance of a ratio of two correlated odds ratios in Stata***From:*"Tiago V. Pereira" <[email protected]>

- Prev by Date:
**st: RE: Sample size for estimating negative predictive value and sensitivity** - Next by Date:
**Re: st: How to test the significance of a ratio of two correlated odds ratios in Stata** - Previous by thread:
**st: How to test the significance of a ratio of two correlated odds ratios in Stata** - Next by thread:
**Re: st: How to test the significance of a ratio of two correlated odds ratios in Stata** - Index(es):