Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhijit Dasgupta committed Oct 9, 2024
1 parent 92fb887 commit a1002fe
Show file tree
Hide file tree
Showing 47 changed files with 1,320 additions and 1,937 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1457aeff
b7fefde3
8 changes: 7 additions & 1 deletion 01-technical-background.html
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
};

// Store cell data
globalThis.qwebrCellDetails = [{"id":1,"code":"lambda = 1\nx <- seq(0, 10, by = 0.1)\ny <- dexp(x, rate = lambda)\nplot(x, y, type ='l')","options":{"editor-max-height":"","fig-height":5,"editor-word-wrap":"true","fig-cap":"","out-width":"700px","results":"markup","read-only":"false","warning":"true","label":"unnamed-chunk-1","editor-font-scale":"1","out-height":"","editor-quick-suggestions":"false","context":"interactive","fig-width":7,"message":"true","autorun":"false","comment":"","classes":"","dpi":72,"output":"true"}},{"id":2,"code":"alpha = 1\nbeta = 1\ny = dweibull(x, shape = alpha, scale = beta)\nplot(x, y, type = 'l')","options":{"editor-max-height":"","fig-height":5,"editor-word-wrap":"true","fig-cap":"","out-width":"700px","results":"markup","read-only":"false","warning":"true","label":"unnamed-chunk-2","editor-font-scale":"1","out-height":"","editor-quick-suggestions":"false","context":"interactive","fig-width":7,"message":"true","autorun":"false","comment":"","classes":"","dpi":72,"output":"true"}}];
globalThis.qwebrCellDetails = [{"id":1,"options":{"dpi":72,"fig-cap":"","editor-quick-suggestions":"false","label":"unnamed-chunk-1","classes":"","output":"true","autorun":"false","editor-font-scale":"1","context":"interactive","message":"true","out-height":"","warning":"true","read-only":"false","fig-height":5,"comment":"","fig-width":7,"editor-word-wrap":"true","editor-max-height":"","out-width":"700px","results":"markup"},"code":"lambda = 1\nx <- seq(0, 10, by = 0.1)\ny <- dexp(x, rate = lambda)\nplot(x, y, type ='l')"},{"id":2,"options":{"dpi":72,"fig-cap":"","editor-quick-suggestions":"false","label":"unnamed-chunk-2","classes":"","output":"true","autorun":"false","editor-font-scale":"1","context":"interactive","message":"true","out-height":"","warning":"true","read-only":"false","fig-height":5,"comment":"","fig-width":7,"editor-word-wrap":"true","editor-max-height":"","out-width":"700px","results":"markup"},"code":"alpha = 1\nbeta = 1\ny = dweibull(x, shape = alpha, scale = beta)\nplot(x, y, type = 'l')"}];

</script>
<script type="module">
Expand Down Expand Up @@ -1667,6 +1667,12 @@
<a href="./chapters/week-05.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Survival analysis I</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./chapters/week-06.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Survival analysis II</span></span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
Expand Down
Binary file added chapters/images/popln_hazard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions chapters/week-01.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@
<a href="../chapters/week-05.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Survival analysis I</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../chapters/week-06.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Survival analysis II</span></span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
Expand Down
8 changes: 7 additions & 1 deletion chapters/week-02.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
};

// Store cell data
globalThis.qwebrCellDetails = [{"options":{"editor-word-wrap":"true","comment":"","fig-width":7,"message":"true","fig-height":5,"out-height":"","fig-cap":"","autorun":"false","context":"interactive","editor-font-scale":"1","results":"markup","warning":"true","editor-max-height":"","dpi":72,"editor-quick-suggestions":"false","output":"true","read-only":"false","label":"unnamed-chunk-1","classes":"","out-width":"700px"},"code":"set.seed(1000)\ninstall.packages(\"tidyverse\")\nlibrary(tidyverse)\nm1 <- 0\nm2 <- 0.2\ns <- 0.5\nn <- 10 # number of samples we observe in 1 expt (replicates)\nnsim <- 1000 # number of simulated expts\n\n# compute sampling distributions\nx1 <- replicate(nsim, mean(rnorm(n, m1, s)))\nx2 <- replicate(nsim, mean(rnorm(n, m2, s)))\n\ndr <- sqrt(n) * (x2 - x1) / (2 * s^2) > qnorm(0.95)\npower <- mean(dr)\n\nd <- tibble(x = c(x1, x2), grp = factor(c(rep(1, nsim), rep(2, nsim))))\n\nggplot(d, aes(x, color = grp)) +\n geom_density() +\n geom_vline(xintercept = sqrt(2) * s / sqrt(n)) +\n scale_x_continuous(limits = c(-1, 1)) +\n theme_bw() +\n labs(title = paste0(\"Power = \", power))","id":1}];
globalThis.qwebrCellDetails = [{"id":1,"options":{"results":"markup","out-width":"700px","autorun":"false","fig-height":5,"fig-width":7,"read-only":"false","editor-word-wrap":"true","label":"unnamed-chunk-1","classes":"","output":"true","warning":"true","editor-quick-suggestions":"false","fig-cap":"","context":"interactive","comment":"","editor-max-height":"","message":"true","editor-font-scale":"1","dpi":72,"out-height":""},"code":"set.seed(1000)\ninstall.packages(\"tidyverse\")\nlibrary(tidyverse)\nm1 <- 0\nm2 <- 0.2\ns <- 0.5\nn <- 10 # number of samples we observe in 1 expt (replicates)\nnsim <- 1000 # number of simulated expts\n\n# compute sampling distributions\nx1 <- replicate(nsim, mean(rnorm(n, m1, s)))\nx2 <- replicate(nsim, mean(rnorm(n, m2, s)))\n\ndr <- sqrt(n) * (x2 - x1) / (2 * s^2) > qnorm(0.95)\npower <- mean(dr)\n\nd <- tibble(x = c(x1, x2), grp = factor(c(rep(1, nsim), rep(2, nsim))))\n\nggplot(d, aes(x, color = grp)) +\n geom_density() +\n geom_vline(xintercept = sqrt(2) * s / sqrt(n)) +\n scale_x_continuous(limits = c(-1, 1)) +\n theme_bw() +\n labs(title = paste0(\"Power = \", power))"}];

</script><script type="module">
// Declare startupMessageQWebR globally
Expand Down Expand Up @@ -1638,6 +1638,12 @@
<a href="../chapters/week-05.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Survival analysis I</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../chapters/week-06.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Survival analysis II</span></span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
Expand Down
8 changes: 7 additions & 1 deletion chapters/week-03.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@
<a href="../chapters/week-05.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Survival analysis I</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../chapters/week-06.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Survival analysis II</span></span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
Expand Down Expand Up @@ -1015,7 +1021,7 @@ <h1 class="title"><span id="sec-week3" class="quarto-section-identifier"><span c
</div>
</div>
<div class="no-row-height column-margin column-container"><div id="ref-hernan:2023" class="csl-entry" role="listitem">
Hernan, Miguel A, and James M Robins. 2023. <span>“Causal Inference: What If.”</span>
Hernan, Miguel A, and James M Robins. 2023. <span>“Causal Inference: What If.”</span> <a href="https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/">https://www.hsph.harvard.edu/miguel-hernan/causal-inference-book/</a>.
</div><div id="ref-pearl:2018" class="csl-entry" role="listitem">
Pearl, Judea, and Dana Mackenzie. 2018. <em>The Book of Why</em>. New York: Basic Books.
</div></div><p>The idea behind this backdoor criterion is, if we condition on values of variables satisfing the backdoor criterion, then the spurious association generated by the confounder disappears. We can “deconfound” (<span class="citation" data-cites="pearl:2018">Pearl and Mackenzie (<a href="#ref-pearl:2018" role="doc-biblioref">2018</a>)</span>) the effect of the confounder by computing the effect of <em>X</em> on <em>Y</em> for every unique value of <em>Z</em> separately, and then take the weighted average of effects, with weights determined by the relative prevalence of different values of <em>Z</em>. To fix ideas, if we consider our earlier ibuprofen example and consider <em>Z</em> to be age groups, then we would compute the treatment effect within each age group, and then take the average treatment effect weighted by the number of people in each age group. One way to statistically approach this is through <em>adjustment</em> for the confounder in a regression model. This approach can be used in observational, non-randomized studies, but there is a more principled approach we will introduce in <a href="week-04.html" class="quarto-xref"><span>Chapter 4</span></a>.</p>
Expand Down
6 changes: 6 additions & 0 deletions chapters/week-04.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@
<a href="../chapters/week-05.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Survival analysis I</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="../chapters/week-06.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Survival analysis II</span></span></a>
</div>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
Expand Down
Loading

0 comments on commit a1002fe

Please sign in to comment.