{"id":345,"date":"2015-07-12T08:44:24","date_gmt":"2015-07-12T07:44:24","guid":{"rendered":"http:\/\/pcool.dyndns.org:8080\/statsbook\/?page_id=345"},"modified":"2025-06-27T20:57:49","modified_gmt":"2025-06-27T19:57:49","slug":"risk-example","status":"publish","type":"page","link":"https:\/\/pcool.dyndns.org\/index.php\/risk-example\/","title":{"rendered":"Risk Example"},"content":{"rendered":"\n<p><strong>Deep sea diving and osteonecrosis of the femoral head<\/strong><\/p>\n\n\n\n<p>In this fictional example, a study-group of 450 subjects over the age of 50 were identified. All subjects were asked if they had been deep-sea diving below a level of 10 metres for at least once in their lives. Furthermore, all subjects had a pelvic radiograph taken that has been scrutinised by a radiologist for signs of osteonecrosis (example of a cross-sectional study).<\/p>\n\n\n\n<p>In our example, we assume that 150 subjects have been deep-sea diving and 300 have not. Of the 150 subjects who have been deep-sea diving, 15 had signs of osteonecrosis on the radiographs whilst 135 did not. In the group of 300 non deep-sea divers, only 2 people had signs of osteonecrosis on the radiographs.<\/p>\n\n\n\n<p>We can now construct a two by two table as follows:<\/p>\n\n\n\n<table id=\"tablepress-2\" class=\"tablepress tablepress-id-2\">\n<thead>\n<tr class=\"row-1\">\n\t<td class=\"column-1\"><\/td><th class=\"column-2\">Osteonecrosis<\/th><th class=\"column-3\">No Osteonecrosis<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Deep Sea Diving<\/td><td class=\"column-2\">15<\/td><td class=\"column-3\">135<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">No Deep Sea Diving<\/td><td class=\"column-2\">2<\/td><td class=\"column-3\">298<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-2 from cache -->\n\n\n<p><strong>Absolute Risk Deep Sea Diving<br><\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">AR(exposure) = \\(\\frac{15}{15+135}\\) = 0.1<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 No Deep Sea Diving<\/strong><\/p>\n\n\n\n<div class=\"wp-block-mathml-mathmlblock\">AR(no exposure) = \\(\\frac{2}{2+298} \\approx 0.0067\\)<\/div>\n\n\n\n<p><strong>Relative Risk<\/strong><\/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\">RR = \\(\\frac{15 \\over (15+135)}{2 \\over (2+298)}\\) = 15<\/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{a \\cdot d}{b \\cdot c}\\) = \\(\\frac{15 \\cdot 298}{2 \\cdot 135} \\approx 16.6 \\)<\/div>\n\n\n\n<p>Or in the R console:<\/p>\n\n\n\n<p>Use the epiR<sup class='sup-ref-note' id='note-zotero-ref-p345-r1-o1'><a class='sup-ref-note' href='#zotero-ref-p345-r1'>1<\/a><\/sup> library:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>library(epiR)<\/em><\/span><\/code><\/pre>\n\n\n\n<p>Create a matrix for use by epiR:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><span style=\"color: #ff0000;\"><em>mat&lt;-matrix(c(15,2,135,298),ncol=2)<\/em><\/span><\/code><\/pre>\n\n\n\n<p>Perform the calculations:<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><em><span style=\"color: #ff0000;\">epi.2by2(mat)<\/span><\/em><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0003f9\" class=\"has-inline-color\"><em>             Outcome +    Outcome -   Total                Inc risk *\nExposed +           15          135     150      10.00 (5.71 to 15.96)\nExposed -            2          298     300       <strong>0.67<\/strong> (0.08 to 2.39)\nTotal               17          433     450       3.78 (2.22 to 5.98)<\/em><\/mark><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0701f9\" class=\"has-inline-color\"><em>Point estimates and 95% CIs:\n-------------------------------------------------------------------\nInc risk ratio                                 15.00 (3.48, 64.74)\nInc odds ratio                                 <strong>16.56<\/strong> (3.73, 73.41)\nAttrib risk in the exposed *                   9.33 (4.44, 14.22)\nAttrib fraction in the exposed (%)            93.33 (71.23, 98.46)\nAttrib risk in the population *                3.11 (1.12, 5.10)\nAttrib fraction in the population (%)         82.35 (35.59, 95.17)\n-------------------------------------------------------------------\nUncorrected chi2 test that OR = 1: chi2(1) = 23.964 Pr&gt;chi2 = &lt;0.001\nFisher exact test that OR = 1: Pr&gt;chi2 = &lt;0.001\n Wald confidence limits\n CI: confidence interval\n * Outcomes per 100 population units<\/em> <\/mark><\/code><\/pre>\n\n\n\n<p>The package epiR<sup class='sup-ref-note' id='note-zotero-ref-p345-r2-o1'><a class='sup-ref-note' href='#zotero-ref-p345-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<pre class=\"wp-block-code has-small-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#0014fe\" class=\"has-inline-color\"><em>&gt; summary(epi.tests(mat))\n   statistic          est        lower      upper\n1         ap  0.333333333 0.2898878816  0.3789871\n2         tp  0.037777778 0.0221582162  0.0597982\n3         se  0.882352941 0.6355908379  0.9854207\n4         sp  0.688221709 0.6422577774  0.7315911\n5    diag.ac  0.695555556 0.6507412520  0.7377768\n6    <strong>diag.or 16.555555556<\/strong> 3.7335839181 73.4110779\n7       nndx  1.752619048 1.3946772799  3.5990822\n8     youden  0.570574650 0.2778486153  0.7170118\n9     pv.pos  0.100000000 0.0570574348  0.1595679\n10    pv.neg  0.993333333 0.9761265024  0.9991916\n11    lr.pos  2.830065359 2.2644605406  3.5369439\n12    lr.neg  0.170943545 0.0464306911  0.6293616\n13    p.rout  0.666666667 0.6210129037  0.7101121\n14     p.rin  0.333333333 0.2898878816  0.3789871\n15    p.tpdn  0.311778291 0.2684089311  0.3577422\n16    p.tndp  0.117647059 0.0145793168  0.3644092\n17    p.dntp  0.900000000 0.8404321149  0.9429426\n18    p.dptn  0.006666667 0.0008083864  0.0238735<\/em><\/mark><\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deep sea diving and osteonecrosis of the femoral head In this fictional example, a study-group of 450 subjects over the age of 50 were identified. All subjects were asked if they had been deep-sea diving below a level of 10 metres for at least once in their lives. Furthermore, all subjects had a pelvic radiograph [&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-345","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/345","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=345"}],"version-history":[{"count":18,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/345\/revisions"}],"predecessor-version":[{"id":4497,"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/pages\/345\/revisions\/4497"}],"wp:attachment":[{"href":"https:\/\/pcool.dyndns.org\/index.php\/wp-json\/wp\/v2\/media?parent=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}