{"id":63157,"date":"2016-01-11T14:00:50","date_gmt":"2016-01-11T19:00:50","guid":{"rendered":"http:\/\/1boringoldman.com\/?p=63157"},"modified":"2016-01-11T14:17:52","modified_gmt":"2016-01-11T19:17:52","slug":"john-henrys-hammer-categorical-variables","status":"publish","type":"post","link":"https:\/\/1boringoldman.com\/index.php\/2016\/01\/11\/john-henrys-hammer-categorical-variables\/","title":{"rendered":"john henry&#8217;s hammer: categorical variables&#8230;"},"content":{"rendered":"\n<p align=\"justify\" class=\"small\">The Categorical Variables just get one post. It&#8217;s not because they aren&#8217;t important. It&#8217;s because I&#8217;ve already said what I&#8217;m up to in this series. And because they&#8217;re easy&#8230;<\/p>\n<div align=\"justify\"><strong><font color=\"#200020\">METHOD 1: the spreadsheet<\/font><\/strong><\/div>\n<ul>\n<div align=\"center\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"272\" border=\"0\" src=\"http:\/\/1boringoldman.com\/images\/spreadsheet-2.jpg\" \/><\/div>\n<p align=\"justify\" class=\"small\">I thought it would be easiest to start with the spreadsheet itself this time because the column headings make it easy to discuss the output. This spreadsheet has been added below the one discussed in <a href=\"http:\/\/1boringoldman.com\/index.php\/2016\/01\/05\/john-henrys-hammer-continuous-variables-i\/\">john henry&rsquo;s hammer: continuous variables I&hellip;<\/a>, downloadable <a href=\"http:\/\/1boringoldman.com\/images\/1BOM-SPREADSHEET-1.xls\" target=\"_blank\">here<\/a>. It&#8217;s shown above with the MADRS efficacy data from the two recent <font color=\"#200020\">Brexpiprazole <em>Augmentation-in-Treatment-Resistant-Depression<\/em><\/font> studies [see <a target=\"_blank\" href=\"http:\/\/1boringoldman.com\/index.php\/2015\/12\/27\/a-story-the-beginning-of-the-end\/\">a story: the beginning of the end&hellip;<\/a>].<\/p>\n<p align=\"justify\" class=\"small\">Categorical Variables show up in almost every Clinical Drug Trial. They are derived variables that hold binary [yes\/no] data based on some specified criteria. They&#8217;re often named, though the criteria for the names vary from study to study. So RESPONSE might be <em><font color=\"#200020\">&laquo;final HAM-D score <u>&lt;<\/u> 50% of the baseline&raquo;<\/font><\/em> or <em><font color=\"#200020\">&laquo;final HAM-D score <u>&lt;<\/u> 50% of the baseline OR final HAM-D score <u>&lt;<\/u> 8&raquo;<\/font><\/em>. In this case, the data is usually reported in the articles &#8211; the tally of the <font color=\"#200020\">yes<\/font>es and <font color=\"#200020\">no<\/font>s. Unlike the Continuous Variables, defining the dataset with Summary Data requires no mathematical manipulations [MEAN, Standard Deviation, Standard Error of the Mean], all you have to do is count.<\/p>\n<p align=\"justify\" class=\"small\">The classic statistical test for significance is <em><font color=\"#200020\">ChiSquare<\/font><\/em>, discussed in <a href=\"http:\/\/1boringoldman.com\/index.php\/2015\/12\/13\/in-the-land-of-sometimes2\/\" target=\"_blank\">in the land of sometimes<sup>[2]<\/sup>&hellip;<\/a>. The spreadsheet supplies two measurements of EFFECT SIZE. The first, <em><font color=\"#200020\">Number Needed to Treat<\/font><\/em> [<font color=\"#200020\">NNT<\/font>], is the more intuitive. It&#8217;s exactly what its name says, how many patients you have to treat to get one that beats what you would&#8217;ve gotten with placebo. The second EFFECT SIZE index is the <font color=\"#200020\">ODDS RATIO <\/font>[<font color=\"#200020\">OR<\/font>]. It is a quantitative measure frequently reported in meta-analyses where multiple studies are compared. One thing to note, unlike Cohen&#8217;s d, the Odds Ratio is not centered between the the 95% Confidence Intervals, so it is often charted on a logarithmic scale [which &quot;centers&quot; the OR]. For the mathematically inclined, the formulas for these column are:<\/p>\n<div align=\"justify\" class=\"small\">&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color=\"#200020\">if a=control<sub>[yes]<\/sub>, b=control<sub>[no]<\/sub>, c=drug<sub>[yes]<\/sub>, &amp; d=drug<sub>[no]<\/sub>, then:<\/font><\/strong><\/div>\n<ol>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">Control Response% = a&divide;(a+b)<\/font><\/strong><\/div>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">Drug Response% = c&divide;(c+d)<\/font><\/strong><\/div>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">ChiSquare = ((a&times;d-b&times;c)&sup2;&times;(a+b+c+d))&divide;((a+b)&times;(c+d)&times;(a+c)&times;(b+d))&nbsp; [1<em>df<\/em>]<\/font><\/strong><\/div>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">NNT = 1&divide;(c&divide;(c+d)-a&divide;(a+b))<\/font><\/strong><\/div>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">OR = (c&divide;d)&divide;(a&divide;b)<\/font><\/strong><\/div>\n<div align=\"justify\" class=\"small\"><strong><font color=\"#200020\">OR<sub>[95%CI]<\/sub> = Exp(Ln(OR)&plusmn;1.96x&radic;((1&divide;a)+(1&divide;b)+(1&divide;c)+(1&divide;d)))<\/font><\/strong><\/div>\n<div align=\"justify\"><sup>&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color=\"#200020\">Ln<\/font><\/strong> is the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Natural_logarithm\" target=\"_blank\">natural log<\/a> value and <strong><font color=\"#200020\">Exp<\/font><\/strong> means raise to the power of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Natural_logarithm\" target=\"_blank\">e<\/a> [take the <em><font color=\"#200020\">antilog<\/font><\/em>]<\/sup><\/div>\n<\/ol>\n<\/ul>\n<div align=\"justify\"><strong><font color=\"#200020\">METHOD 2: The Internet Calculators<\/font><\/strong><\/div>\n<ul>\n<div align=\"justify\" class=\"small\">In this case, the Internet Calculators are all over the place. For the <em><font color=\"#200020\">Chi Square<\/font><\/em> calculations, I use the one at <a target=\"_blank\" href=\"http:\/\/vassarstats.net\/tab2x2.html\">VassarStats<\/a> because it gives the classic <em><font color=\"#200020\">Pearson&#8217;s Chi Square<\/font><\/em>, but it also calculates the <font color=\"#200020\">Chi Square<\/font> with the <em><font color=\"#200020\">Yates correction<\/font><\/em>. In addition, it computes the <em><font color=\"#200020\">Fisher Exact Probability Test<\/font><\/em>. These refinements are used in articles occasionally and the VassarStats page gives those results and links to an explanation of each [see Chapter 8 in their <a target=\"_blank\" href=\"http:\/\/vassarstats.net\/textbook\/index.html\">Web Textbook<\/a>] so I don&#8217;t have to try and explain. And as for the <em><font color=\"#200020\">Odds Ratio<\/font><\/em> and its <em><font color=\"#200020\">95% Confidence Intervals<\/font><\/em>, Why not stick with a winner &#8211; <font color=\"#200020\">VassarStats<\/font>? This version of their <a href=\"http:\/\/vassarstats.net\/odds2x2.html\" target=\"_blank\">Internet Calculator<\/a> does both the <em><font color=\"#200020\">Chi Square<\/font><\/em> and the <em><font color=\"#200020\">Odds Ratio<\/font><\/em> with its <em><font color=\"#200020\">95% Confidence Intervals<\/font><\/em>. One stop shopping! As for the <em><font color=\"#200020\">NNT<\/font><\/em>, there are Internet Calculators around, but frankly it&#8217;s almost easier to do it in your head or using the calculator in your computer. Subtract the %yes of the control&nbsp; from the %yes of the drug and divide the result into 100. That&#8217;s all there is to it. So <strong><font color=\"#200020\">23.5%-14.7%=8.8%<\/font><\/strong> then <strong><font color=\"#200020\">100&divide;8.8=11.27<\/font><\/strong>.<\/div>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The Categorical Variables just get one post. It&#8217;s not because they aren&#8217;t important. It&#8217;s because I&#8217;ve already said what I&#8217;m up to in this series. And because they&#8217;re easy&#8230; METHOD 1: the spreadsheet I thought it would be easiest to start with the spreadsheet itself this time because the column headings make it easy to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-63157","post","type-post","status-publish","format-standard","hentry","category-opinion"],"_links":{"self":[{"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/posts\/63157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/comments?post=63157"}],"version-history":[{"count":24,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/posts\/63157\/revisions"}],"predecessor-version":[{"id":63181,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/posts\/63157\/revisions\/63181"}],"wp:attachment":[{"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/media?parent=63157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/categories?post=63157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1boringoldman.com\/index.php\/wp-json\/wp\/v2\/tags?post=63157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}