<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />


<meta name="author" content="Lei Sun" />

<meta name="date" content="2018-04-16" />

<title>Re-Analyze Efron’s Leukemia Data</title>

<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/cosmo.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<script src="site_libs/navigation-1.1/codefolding.js"></script>
<link href="site_libs/highlightjs-9.12.0/textmate.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<link href="site_libs/font-awesome-4.5.0/css/font-awesome.min.css" rel="stylesheet" />

<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
  pre:not([class]) {
    background-color: white;
  }
</style>
<script type="text/javascript">
if (window.hljs) {
  hljs.configure({languages: []});
  hljs.initHighlightingOnLoad();
  if (document.readyState && document.readyState === "complete") {
    window.setTimeout(function() { hljs.initHighlighting(); }, 0);
  }
}
</script>



<style type="text/css">
h1 {
  font-size: 34px;
}
h1.title {
  font-size: 38px;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 24px;
}
h4 {
  font-size: 18px;
}
h5 {
  font-size: 16px;
}
h6 {
  font-size: 12px;
}
.table th:not([align]) {
  text-align: left;
}
</style>


</head>

<body>

<style type = "text/css">
.main-container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}
code {
  color: inherit;
  background-color: rgba(0, 0, 0, 0.04);
}
img {
  max-width:100%;
  height: auto;
}
.tabbed-pane {
  padding-top: 12px;
}
button.code-folding-btn:focus {
  outline: none;
}
</style>


<style type="text/css">
/* padding for bootstrap navbar */
body {
  padding-top: 51px;
  padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar)  */
.section h1 {
  padding-top: 56px;
  margin-top: -56px;
}

.section h2 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h3 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h4 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h5 {
  padding-top: 56px;
  margin-top: -56px;
}
.section h6 {
  padding-top: 56px;
  margin-top: -56px;
}
</style>

<script>
// manage active state of menu based on current page
$(document).ready(function () {
  // active menu anchor
  href = window.location.pathname
  href = href.substr(href.lastIndexOf('/') + 1)
  if (href === "")
    href = "index.html";
  var menuAnchor = $('a[href="' + href + '"]');

  // mark it active
  menuAnchor.parent().addClass('active');

  // if it's got a parent navbar menu mark it active as well
  menuAnchor.closest('li.dropdown').addClass('active');
});
</script>


<div class="container-fluid main-container">

<!-- tabsets -->
<script>
$(document).ready(function () {
  window.buildTabsets("TOC");
});
</script>

<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<script>
$(document).ready(function () {
  window.initializeCodeFolding("hide" === "show");
});
</script>




<script>
$(document).ready(function ()  {

    // move toc-ignore selectors from section div to header
    $('div.section.toc-ignore')
        .removeClass('toc-ignore')
        .children('h1,h2,h3,h4,h5').addClass('toc-ignore');

    // establish options
    var options = {
      selectors: "h1,h2,h3",
      theme: "bootstrap3",
      context: '.toc-content',
      hashGenerator: function (text) {
        return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_').toLowerCase();
      },
      ignoreSelector: ".toc-ignore",
      scrollTo: 0
    };
    options.showAndHide = true;
    options.smoothScroll = true;

    // tocify
    var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>

<style type="text/css">

#TOC {
  margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
  position: relative;
  width: 100%;
}
}


.toc-content {
  padding-left: 30px;
  padding-right: 40px;
}

div.main-container {
  max-width: 1200px;
}

div.tocify {
  width: 20%;
  max-width: 260px;
  max-height: 85%;
}

@media (min-width: 768px) and (max-width: 991px) {
  div.tocify {
    width: 25%;
  }
}

@media (max-width: 767px) {
  div.tocify {
    width: 100%;
    max-width: none;
  }
}

.tocify ul, .tocify li {
  line-height: 20px;
}

.tocify-subheader .tocify-item {
  font-size: 0.90em;
  padding-left: 25px;
  text-indent: 0;
}

.tocify .list-group-item {
  border-radius: 0px;
}


</style>

<!-- setup 3col/9col grid for toc_float and main content  -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>

<div class="toc-content col-xs-12 col-sm-8 col-md-9">




<div class="navbar navbar-default  navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="index.html">truncash</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="index.html">Home</a>
</li>
<li>
  <a href="about.html">About</a>
</li>
<li>
  <a href="license.html">License</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="https://github.com/LSun/truncash">
    <span class="fa fa-github"></span>
     
  </a>
</li>
      </ul>
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

<div class="fluid-row" id="header">

<div class="btn-group pull-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul>
</div>



<h1 class="title toc-ignore">Re-Analyze Efron’s Leukemia Data</h1>
<h4 class="author"><em>Lei Sun</em></h4>
<h4 class="date"><em>2018-04-16</em></h4>

</div>


<!-- The file analysis/chunks.R contains chunks that define default settings
shared across the workflowr files. -->
<!-- Update knitr chunk options -->
<!-- Insert the date the file was last updated -->
<p><strong>Last updated:</strong> 2018-05-09</p>
<!-- Insert the code version (Git commit SHA1) if Git repository exists and R
 package git2r is installed -->
<p><strong>Code version:</strong> 4070fcd</p>
<!-- Add your analysis here -->
<div id="introduction" class="section level2">
<h2>Introduction</h2>
<pre class="r"><code>source(&quot;../code/gdash_lik.R&quot;)
source(&quot;../code/gdfit.R&quot;)
library(limma)
library(locfdr)
library(scales)</code></pre>
<pre class="r"><code>load(&quot;../data/LSI/leukdata.RData&quot;)
load(&quot;../data/LSI/leukz.RData&quot;)
design &lt;- design &lt;- c(rep(0, 47), rep(1, 25))</code></pre>
<pre class="r"><code>temp &lt;- locfdr(leukz)</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-3-1.png" width="672" style="display: block; margin: auto;" /></p>
</div>
<div id="reproduce-efrons-empirical-null-analysis" class="section level2">
<h2>Reproduce Efron’s empirical null analysis</h2>
<pre class="r"><code>t &lt;- apply(leukdata, 1, function (x) {
  t.test(x[design == 1], x[design == 0], var.equal = TRUE)$statistic
})
z &lt;- -qnorm(pt(-abs(t), 70)) * sign(t)</code></pre>
<pre class="r"><code>temp &lt;- locfdr(z)</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-5-1.png" width="672" style="display: block; margin: auto;" /></p>
</div>
<div id="use-smyths-pipeline-to-obtain-better-summary-statistics" class="section level2">
<h2>Use Smyth’s pipeline to obtain better summary statistics</h2>
<pre class="r"><code>lim = limma::lmFit(leukdata, model.matrix(~design))
r.ebayes = limma::eBayes(lim)
p = r.ebayes$p.value[, 2]
t = r.ebayes$t[, 2]
z = -sign(t) * qnorm(p/2)</code></pre>
<pre class="r"><code>fit.locfdr &lt;- locfdr(z)</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-7-1.png" width="672" style="display: block; margin: auto;" /></p>
<pre class="r"><code>fit.qvalue &lt;- qvalue::qvalue(p)</code></pre>
</div>
<div id="cash-fitting" class="section level2">
<h2>CASH fitting</h2>
<ul>
<li>betahat = sebetahat * z</li>
</ul>
<pre class="r"><code>betahat = lim$coefficients[, 2]
sebetahat = betahat / t
betahat = sebetahat * z</code></pre>
<pre class="r"><code>fit.cash &lt;- gdash(betahat, sebetahat, gd.ord = 10)
fit.ash &lt;- ashr::ash(betahat, sebetahat, mixcompdist = &quot;normal&quot;, method = &quot;fdr&quot;)</code></pre>
<pre class="r"><code>x.plot &lt;- seq(-10, 10, length = 1000)
gd.ord &lt;- 10
hermite = Hermite(gd.ord)
gd0.std = dnorm(x.plot)
matrix_lik_plot = cbind(gd0.std)
for (i in 1 : gd.ord) {
  gd.std = (-1)^i * hermite[[i]](x.plot) * gd0.std / sqrt(factorial(i))
  matrix_lik_plot = cbind(matrix_lik_plot, gd.std)
}
y.plot = matrix_lik_plot %*% fit.cash$w * fit.cash$fitted_g$pi[1]

method.col &lt;- c(&quot;#377eb8&quot;, &quot;#984ea3&quot;, &quot;#4daf4a&quot;, &quot;#ff7f00&quot;, &quot;#e41a1c&quot;)

par(mfrow = c(1, 2))
hist(z, prob = TRUE, main = &quot;&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
lines(x.plot, y.plot, col = method.col[5], lwd = 2)
lines(x.plot, dnorm(x.plot), col = 
       &quot;orange&quot;
      #  method.col[2]
      , lty = 2, lwd = 2)
lines(x.plot, dnorm(x.plot, fit.locfdr$fp0[3, 1], fit.locfdr$fp0[3, 2]) * fit.locfdr$fp0[3, 3], col = method.col[3], lty = 2, lwd = 2)
text(-3, 0.22, &quot;N(0,1)&quot;, col = &quot;orange&quot;)
text(-5, 0.15, bquote(atop(&quot;Efron&#39;s empirical null&quot;, .(round(fit.locfdr$fp0[3, 3], 2)) %*% N(.(round(fit.locfdr$fp0[3, 1], 2)), .(round(fit.locfdr$fp0[3, 2], 2))^2))), col = method.col[3])
text(4.5, 0.10, &quot;CASH null&quot;, col = method.col[5])
arrows(-1.8, 0.22, -1.1, 0.215, length = 0.1, angle = 20, col = &quot;orange&quot;)
arrows(-2, 0.15, -1.5, 0.145, length = 0.1, angle = 20, col = method.col[3])
arrows(2.9, 0.10, 2, 0.095, length = 0.1, angle = 20, col = method.col[5])

plot(z, fit.cash$lfdr, pch = 18, cex = 0.5, ylim = c(0, 1), col = method.col[5], ylab = &quot;Local FDR&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
points(z, fit.locfdr$fdr, pch = 16, cex = 0.5, col = method.col[3])
points(z, ashr::get_lfdr(fit.ash), pch = 17, cex = 0.5, col = method.col[4])
points(z, fit.qvalue$lfdr, pch = 15, cex = 0.5, col = method.col[2])
abline(h = 0.2, lty = 2)
legend(&quot;topright&quot;, bty = &quot;n&quot;, pch = 15 : 18, col = method.col[2 : 5], c(&quot;qvalue&quot;, &quot;locfdr&quot;, &quot;ASH&quot;, &quot;CASH&quot;))</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-11-1.png" width="672" style="display: block; margin: auto;" /></p>
<ul>
<li>sebetahat = betahat / z</li>
</ul>
<pre class="r"><code>betahat = lim$coefficients[, 2]
sebetahat = betahat / z</code></pre>
<pre class="r"><code>fit.cash2 &lt;- gdash(betahat, sebetahat, gd.ord = 10)</code></pre>
<pre class="r"><code>y.plot2 = matrix_lik_plot %*% fit.cash2$w * fit.cash2$fitted_g$pi[1]

par(mfrow = c(1, 2))
hist(z, prob = TRUE, main = &quot;&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
lines(x.plot, y.plot, col = &quot;red&quot;, lwd = 2)
lines(x.plot, y.plot2, col = &quot;blue&quot;, lwd = 2)
lines(x.plot, dnorm(x.plot, fit.locfdr$fp0[3, 1], fit.locfdr$fp0[3, 2]) * fit.locfdr$fp0[3, 3], col = &#39;green&#39;, lty = 2, lwd = 2)

plot(z, fit.cash$lfdr, pch = 18, cex = 0.5, ylim = c(0, 1), col = &quot;red&quot;, ylab = &quot;Local FDR&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
points(z, fit.cash2$lfdr, pch = 17, cex = 0.5, col = &quot;blue&quot;)
points(z, fit.locfdr$fdr, pch = 16, cex = 0.5, col = &quot;green&quot;)
abline(h = 0.2, lty = 2)
legend(&quot;topright&quot;, bty = &quot;n&quot;, pch = c(16, 18, 17), col = c(&quot;green&quot;, &quot;red&quot;, &quot;blue&quot;), c(&quot;qvalue&quot;, &quot;CASH: 1&quot;, &quot;CASH: 2&quot;))</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-14-1.png" width="672" style="display: block; margin: auto;" /></p>
<ul>
<li>sebetahat = betahat / z</li>
</ul>
<pre class="r"><code>betahat = lim$coefficients[, 2]
sebetahat = betahat / z</code></pre>
<pre class="r"><code>fit.cash &lt;- gdash(betahat, sebetahat, gd.ord = 10)
fit.ash &lt;- ashr::ash(betahat, sebetahat, mixcompdist = &quot;normal&quot;, method = &quot;fdr&quot;)</code></pre>
<pre class="r"><code>x.plot &lt;- seq(-10, 10, length = 1000)
gd.ord &lt;- 10
hermite = Hermite(gd.ord)
gd0.std = dnorm(x.plot)
matrix_lik_plot = cbind(gd0.std)
for (i in 1 : gd.ord) {
  gd.std = (-1)^i * hermite[[i]](x.plot) * gd0.std / sqrt(factorial(i))
  matrix_lik_plot = cbind(matrix_lik_plot, gd.std)
}
y.plot = matrix_lik_plot %*% fit.cash$w * fit.cash$fitted_g$pi[1]

method.col &lt;- c(&quot;#377eb8&quot;, &quot;#984ea3&quot;, &quot;#4daf4a&quot;, &quot;#ff7f00&quot;, &quot;#e41a1c&quot;)

setEPS()
postscript(&quot;../output/fig/leukemia.eps&quot;, height = 5, width = 12)

par(mfrow = c(1, 2))
hist(z, prob = TRUE, main = &quot;&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
lines(x.plot, y.plot, col = method.col[5], lwd = 2)
lines(x.plot, dnorm(x.plot), col = 
       &quot;orange&quot;
      #  method.col[2]
      , lty = 2, lwd = 2)
lines(x.plot, dnorm(x.plot, fit.locfdr$fp0[3, 1], fit.locfdr$fp0[3, 2]) * fit.locfdr$fp0[3, 3], col = method.col[3], lty = 2, lwd = 2)
text(-3, 0.22, &quot;N(0,1)&quot;, col = &quot;orange&quot;)
text(-5, 0.15, bquote(atop(&quot;Efron&#39;s empirical null&quot;, .(round(fit.locfdr$fp0[3, 3], 2)) %*% N(.(round(fit.locfdr$fp0[3, 1], 2)), .(round(fit.locfdr$fp0[3, 2], 2))^2))), col = method.col[3])
text(4.5, 0.10, &quot;CASH null&quot;, col = method.col[5])
arrows(-1.8, 0.22, -1.1, 0.215, length = 0.1, angle = 20, col = &quot;orange&quot;)
arrows(-2, 0.15, -1.5, 0.145, length = 0.1, angle = 20, col = method.col[3])
arrows(2.9, 0.10, 2, 0.095, length = 0.1, angle = 20, col = method.col[5])

plot(z, fit.cash$lfdr, pch = 18, cex = 0.5, ylim = c(0, 1), col = method.col[5], ylab = &quot;Local FDR&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
points(z, fit.locfdr$fdr, pch = 16, cex = 0.5, col = method.col[3])
points(z, ashr::get_lfdr(fit.ash), pch = 17, cex = 0.5, col = method.col[4])
points(z, fit.qvalue$lfdr, pch = 15, cex = 0.5, col = method.col[2])
abline(h = 0.2, lty = 2)
legend(&quot;topright&quot;, bty = &quot;n&quot;, pch = 15 : 18, col = method.col[2 : 5], c(&quot;qvalue&quot;, &quot;locfdr&quot;, &quot;ASH&quot;, &quot;CASH&quot;))

dev.off()</code></pre>
<pre><code>quartz_off_screen 
                2 </code></pre>
</div>
<div id="hiv" class="section level2">
<h2>HIV</h2>
<pre class="r"><code>load(&quot;../data/LSI/hivdata.RData&quot;)
load(&quot;../data/LSI/hivz.RData&quot;)
design &lt;- rep(0 : 1, each = 4)</code></pre>
<div id="reproduce-efrons-empirical-null-analysis-1" class="section level3">
<h3>Reproduce Efron’s empirical null analysis</h3>
<pre class="r"><code>temp &lt;- locfdr(hivz)</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-19-1.png" width="672" style="display: block; margin: auto;" /></p>
</div>
<div id="use-smyths-pipeline-to-obtain-better-summary-statistics-1" class="section level3">
<h3>Use Smyth’s pipeline to obtain better summary statistics</h3>
<pre class="r"><code>loghivdata &lt;- log2(hivdata)
loghivdata &lt;- limma::normalizeBetweenArrays(loghivdata)
lim = limma::lmFit(loghivdata, model.matrix(~design))
r.ebayes = limma::eBayes(lim)
p = r.ebayes$p.value[, 2]
t = r.ebayes$t[, 2]
z = -sign(t) * qnorm(p/2)</code></pre>
<pre class="r"><code>fit.locfdr &lt;- locfdr(z)</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-21-1.png" width="672" style="display: block; margin: auto;" /></p>
<pre class="r"><code>fit.qvalue &lt;- qvalue::qvalue(p)</code></pre>
</div>
<div id="cash-fitting-1" class="section level3">
<h3>CASH fitting</h3>
<ul>
<li>sebetahat = betahat / z</li>
</ul>
<pre class="r"><code>betahat = lim$coefficients[, 2]
sebetahat = betahat / z</code></pre>
<pre class="r"><code>fit.cash &lt;- gdash(betahat, sebetahat, gd.ord = 10)
fit.ash &lt;- ashr::ash(betahat, sebetahat, mixcompdist = &quot;normal&quot;, method = &quot;fdr&quot;)</code></pre>
<pre class="r"><code>x.plot &lt;- seq(-7, 5, length = 1000)
gd.ord &lt;- 10
hermite = Hermite(gd.ord)
gd0.std = dnorm(x.plot)
matrix_lik_plot = cbind(gd0.std)
for (i in 1 : gd.ord) {
  gd.std = (-1)^i * hermite[[i]](x.plot) * gd0.std / sqrt(factorial(i))
  matrix_lik_plot = cbind(matrix_lik_plot, gd.std)
}
y.plot = matrix_lik_plot %*% fit.cash$w * fit.cash$fitted_g$pi[1]

method.col &lt;- scales::hue_pal()(5)

par(mfrow = c(1, 2))
hist(z, prob = TRUE, main = &quot;&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25, breaks = 50)
lines(x.plot, y.plot, col = method.col[5], lwd = 2)
lines(x.plot, dnorm(x.plot), col = 
       &quot;orange&quot;
      #  method.col[2]
      , lty = 2, lwd = 2)
lines(x.plot, dnorm(x.plot, fit.locfdr$fp0[3, 1], fit.locfdr$fp0[3, 2]) * fit.locfdr$fp0[3, 3], col = method.col[3], lty = 2, lwd = 2)
text(-3, 0.22, &quot;N(0,1)&quot;, col = &quot;orange&quot;)
text(-5, 0.15, bquote(atop(&quot;Efron&#39;s empirical null&quot;, .(round(fit.locfdr$fp0[3, 3], 2)) %*% N(.(round(fit.locfdr$fp0[3, 1], 2)), .(round(fit.locfdr$fp0[3, 2], 2))^2))), col = method.col[3])
text(4.5, 0.10, &quot;CASH null&quot;, col = method.col[5])
arrows(-1.8, 0.22, -1.1, 0.215, length = 0.1, angle = 20, col = &quot;orange&quot;)
arrows(-2, 0.15, -1.5, 0.145, length = 0.1, angle = 20, col = method.col[3])
arrows(2.9, 0.10, 2, 0.095, length = 0.1, angle = 20, col = method.col[5])

plot(z, fit.cash$lfdr, pch = 18, cex = 0.5, ylim = c(0, 1), col = method.col[5], ylab = &quot;Local FDR&quot;, xlab = expression(paste(z, &quot;-scores&quot;)), cex.lab = 1.25)
points(z, fit.locfdr$fdr, pch = 16, cex = 0.5, col = method.col[3])
points(z, ashr::get_lfdr(fit.ash), pch = 17, cex = 0.5, col = method.col[4])
points(z, fit.qvalue$lfdr, pch = 15, cex = 0.5, col = method.col[2])
abline(h = 0.2, lty = 2)
legend(&quot;topleft&quot;, bty = &quot;n&quot;, pch = 15 : 18, col = method.col[2 : 5], c(&quot;qvalue&quot;, &quot;locfdr&quot;, &quot;ASH&quot;, &quot;CASH&quot;))</code></pre>
<p><img src="figure/efron_leukemia.rmd/unnamed-chunk-25-1.png" width="672" style="display: block; margin: auto;" /></p>
</div>
</div>
<div id="session-information" class="section level2">
<h2>Session information</h2>
<!-- Insert the session information into the document -->
<pre class="r"><code>sessionInfo()</code></pre>
<pre><code>R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] scales_0.5.0      locfdr_1.1-8      limma_3.34.4     
 [4] ashr_2.2-2        Rmosek_8.0.69     PolynomF_1.0-1   
 [7] CVXR_0.95         REBayes_1.2       Matrix_1.2-12    
[10] SQUAREM_2017.10-1 EQL_1.0-0         ttutils_1.0-1    

loaded via a namespace (and not attached):
 [1] gmp_0.5-13.1      Rcpp_0.12.16      pillar_1.0.1     
 [4] plyr_1.8.4        compiler_3.4.3    git2r_0.21.0     
 [7] R.methodsS3_1.7.1 R.utils_2.6.0     iterators_1.0.9  
[10] tools_3.4.3       digest_0.6.15     bit_1.1-12       
[13] tibble_1.4.1      gtable_0.2.0      evaluate_0.10.1  
[16] lattice_0.20-35   rlang_0.1.6       foreach_1.4.4    
[19] yaml_2.1.18       parallel_3.4.3    Rmpfr_0.6-1      
[22] ECOSolveR_0.4     stringr_1.3.0     knitr_1.20       
[25] rprojroot_1.3-2   bit64_0.9-7       grid_3.4.3       
[28] qvalue_2.10.0     R6_2.2.2          rmarkdown_1.9    
[31] reshape2_1.4.3    ggplot2_2.2.1     magrittr_1.5     
[34] splines_3.4.3     MASS_7.3-47       backports_1.1.2  
[37] codetools_0.2-15  htmltools_0.3.6   scs_1.1-1        
[40] assertthat_0.2.0  colorspace_1.3-2  stringi_1.1.6    
[43] lazyeval_0.2.1    munsell_0.4.3     doParallel_1.0.11
[46] pscl_1.5.2        truncnorm_1.0-7   R.oo_1.21.0      </code></pre>
</div>

<hr>
<p>
    This <a href="http://rmarkdown.rstudio.com">R Markdown</a> site was created with <a href="https://github.com/jdblischak/workflowr">workflowr</a>
</p>
<hr>

<!-- To enable disqus, uncomment the section below and provide your disqus_shortname -->

<!-- disqus
  <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'rmarkdown'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
-->


</div>
</div>

</div>

<script>

// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
  $('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
  bootstrapStylePandocTables();
});


</script>

<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
  (function () {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src  = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
    document.getElementsByTagName("head")[0].appendChild(script);
  })();
</script>

</body>
</html>