{"id":319,"date":"2015-07-11T13:44:00","date_gmt":"2015-07-11T12:44:00","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=319"},"modified":"2025-06-27T20:53:58","modified_gmt":"2025-06-27T19:53:58","slug":"epidemiology","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/epidemiology\/","title":{"rendered":"Risks and Odds Ratio"},"content":{"rendered":"\n<table id=\"tablepress-1\" class=\"tablepress tablepress-id-1\">\n<thead>\n<tr class=\"row-1\">\n\t<td class=\"column-1\"><\/td><th class=\"column-2\">Disease<\/th><th class=\"column-3\">No Disease<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Exposure<\/td><td class=\"column-2\">a<\/td><td class=\"column-3\">b<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">No Exposure<\/td><td class=\"column-2\">c<\/td><td class=\"column-3\">d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-1 from cache -->\n\n\n<p><strong>Absolute Risk Exposed Individuals<br><\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">AR(exposure) = \\( \\frac{a}{a+b}\\)<script src=\"https:\/\/pcool.dyndns.org\/wp-includes\/js\/dist\/hooks.min.js?ver=dd5603f07f9220ed27f1\" id=\"wp-hooks-js\"><\/script>\n<script src=\"https:\/\/pcool.dyndns.org\/wp-includes\/js\/dist\/i18n.min.js?ver=c26c3dc7bed366793375\" id=\"wp-i18n-js\"><\/script>\n<script id=\"wp-i18n-js-after\">\nwp.i18n.setLocaleData( { 'text direction\\u0004ltr': [ 'ltr' ] } );\n\/\/# sourceURL=wp-i18n-js-after\n<\/script>\n<script  async src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/mathjax\/2.7.7\/MathJax.js?config=TeX-MML-AM_CHTML\" id=\"mathjax-js\"><\/script>\n<\/div>\n\n\n\n<p><strong>Absolute Risk Non Exposed Individuals<br><\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">AR(exposure) = \\( \\frac{c}{c+d}\\)<\/div>\n\n\n\n<p><strong>Relative Risk<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Risk of exposed individuals getting the disease as compared to non exposed individuals:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">Relative Risk = \\( \\frac{a \\over (a+b) }{c \\over (c+d)}\\)<\/div>\n\n\n\n<p><strong>Odds Ratio<\/strong><\/p>\n\n\n\n<p>The odds ratio is the ratio of the odds of a disease occurring among exposed individuals to that of it occurring in unexposed individuals:<\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">OR = \\(\\frac{\\frac{a}{a + b}}{\\frac{b}{a + b}} \\quad \\text{:} \\quad \\frac{\\frac{c}{c + d}}{\\frac{d}{c + d}} \\) = \\(\\frac{a \\cdot d}{b \\cdot c} \\)<\/div>\n\n\n\n<p><strong>The absolute risk is always between zero and 1 and the relative risk is always larger than zero.<\/strong><\/p>\n\n\n\n<p>If the relative risk = 1, there is no increased risk for developing the disease. A relative risk less than 1 (but larger than zero) indicates that the exposure protects against disease. If the relative risk is larger than 1, there is an increased risk for developing the disease. The greater the value, the stronger the link is between exposure and disease.<\/p>\n\n\n\n<p>In other words, if the relative risk = 1; the exposure is not a risk factor for disease. The larger the relative risk, the bigger the risk becomes. If the relative risk is very high, one could call it the <strong><em>cause<\/em><\/strong> of the disease. There is no cut-off point between risk factor and cause; but there is a spectrum.<\/p>\n\n\n\n<p>Exactly the same is true for the odds ratio. If the value of the odds ratio is between zero and 1, the exposure protects against disease. An odds ratio greater than 1 indicates that the exposure is a risk factor. The larger the odds ratio becomes, the stronger the risk of developing disease. If the odds ratio =1, the exposure has no influence of the development of disease.<\/p>\n\n\n\n<p>In the R console<sup class='sup-ref-note' id='note-zotero-ref-p319-r1-o1'><a class='sup-ref-note' href='#zotero-ref-p319-r1'>1<\/a><\/sup>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>library(epiR)<\/em><\/span>\n<span style=\"color: #ff0000;\"> <em>mat&lt;-matrix(c(a,c,b,d),ncol=2) <\/em><span style=\"color: #000000;\">{enter values!}<\/span><\/span>\n<span style=\"color: #ff0000;\"> <em>mat<\/em><\/span>\n     <span style=\"color: #0000ff;\"><em>&#091;,1] &#091;,2]<\/em><\/span>\n<span style=\"color: #0000ff;\"><em>&#091;1,]&nbsp;&nbsp; a&nbsp;   b<\/em><\/span>\n<span style=\"color: #0000ff;\"><em>&#091;2,]&nbsp;&nbsp; c&nbsp;   d<\/em><\/span><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em> epi.2by2(mat)<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Outcome +&nbsp;&nbsp;&nbsp; Outcome -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Total&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inc risk *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Odds<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Exposed +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Exposed -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Total&nbsp;&nbsp;&nbsp;<\/em><\/span>\n<span style=\"color: #0000ff;\"><em>Point estimates and 95 % CIs:<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> ---------------------------------------------------------<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Inc risk ratio&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Odds ratio&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Attrib risk *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Attrib risk in population *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Attrib fraction in exposed (%)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> Attrib fraction in population (%)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/em><\/span>\n<span style=\"color: #0000ff;\"><em> ---------------------------------------------------------<\/em><\/span>\n<span style=\"color: #0000ff;\"><em> * Cases per 100 population units&nbsp;<\/em><\/span><\/code><\/pre>\n\n\n\n<p>The package epiR<sup class='sup-ref-note' id='note-zotero-ref-p319-r2-o1'><a class='sup-ref-note' href='#zotero-ref-p319-r2'>2<\/a><\/sup> should be <a href=\"https:\/\/pcool.dyndns.org\/index.php\/packages\/\" data-type=\"page\" data-id=\"22\">installed<\/a>.<\/p>\n\n\n\n<p class=\"is-style-text-annotation is-style-text-annotation--1\"><em>Please note, the maximum likelihood odds ratio is a different estimate than the cross product ratio.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\">summary(epi.tests(mat))<\/span>\n<span style=\"color: #0000ff;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; est&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lower&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; upper<\/span>\n<span style=\"color: #0000ff;\">aprev&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">tprev&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">se&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">sp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">diag.acc&nbsp; <\/span>\n<span style=\"color: #0000ff;\">diag.or&nbsp;<span style=\"color: #000000;\"> {This is the cross product (diagnostic) odds ratio}<\/span><\/span>\n<span style=\"color: #0000ff;\">nnd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">youden&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">ppv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">npv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">plr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>\n<span style=\"color: #0000ff;\">nlr<\/span><\/code><\/pre>\n\n\n\n<p><span style=\"color: #0000ff;\"><br><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Absolute Risk Exposed Individuals Absolute Risk Non Exposed Individuals Relative Risk Risk of exposed individuals getting the disease as compared to non exposed individuals: Odds Ratio The odds ratio is the ratio of the odds of a disease occurring among exposed individuals to that of it occurring in unexposed individuals: The absolute risk is always [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-319","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/comments?post=319"}],"version-history":[{"count":7,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/319\/revisions"}],"predecessor-version":[{"id":4493,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/319\/revisions\/4493"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}