What you presented below is not an odds ratio, but simply the odds of disease 
when some measure is less than 40%.  But you can use the oddsratio() function 
from the epitools package to do the calculations that you want.

Hope this is helpful,

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204

From: C W [mailto:tmrs...@gmail.com]
Sent: Tuesday, August 14, 2012 11:59 AM
To: Nordlund, Dan (DSHS/RDA)
Cc: r-help
Subject: Re: [R] What package to use to calculate odds ratio and the confidence 
interval?

Suppose my results comes out like this,



<40%

>40%

Total

No disease

131

75

206

Have disease

27

6

33







239


My odds ratio: 27/(27+131))/(131/(27+131)) = 0.206

I want to calculate the confidence interval for it.
Mike

On Tue, Aug 14, 2012 at 2:52 PM, Nordlund, Dan (DSHS/RDA) 
<nord...@dshs.wa.gov<mailto:nord...@dshs.wa.gov>> wrote:
> -----Original Message-----
> From: r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org> 
> [mailto:r-help-bounces@r-<mailto:r-help-bounces@r->
> project.org<http://project.org>] On Behalf Of C W
> Sent: Tuesday, August 14, 2012 11:18 AM
> To: r-help
> Subject: [R] What package to use to calculate odds ratio and the
> confidence interval?
>
> Hi list,
> I am trying to calculate the sensitivity, specificity, and odds
> ratio(and
> confidence interval).
> Say, my data looks like this
>
> 42.53, 37.56, 40.51, 32.67, 38.19, 81.74, 41.55, 68.94, 59, 63, 54.13,
> 48.85, 50.46, 51.78
>
> Is there any packages in R that does this?  Espeically the odds ratio
> confidence interval.
>
> Mike
You need to provide more information than  you have.  The odds of something 
happening is the probability of it happening divided by (1-probability).  To 
calculate the odds ratio, you need to have odds for two different groups.  I 
suspect you need to get some local statistical assistance on these concepts 
before you will get much help on R packages and functions.

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204


______________________________________________
R-help@r-project.org<mailto:R-help@r-project.org> mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to