kidney/slides.html
2026-05-20 16:54:59 +02:00

5888 lines
No EOL
187 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.7.34">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Slides</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
html { -webkit-text-size-adjust: 100%; }
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
</style>
<script src="slides_files/libs/clipboard/clipboard.min.js"></script>
<script src="slides_files/libs/quarto-html/quarto.js" type="module"></script>
<script src="slides_files/libs/quarto-html/tabsets/tabsets.js" type="module"></script>
<script src="slides_files/libs/quarto-html/popper.min.js"></script>
<script src="slides_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="slides_files/libs/quarto-html/anchor.min.js"></script>
<link href="slides_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="slides_files/libs/quarto-html/quarto-syntax-highlighting-c8ad9e5dbd60b7b70b38521ab19b7da4.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="slides_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="slides_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="slides_files/libs/bootstrap/bootstrap-0e7144b51b1311dce330ab5b48d20e8e.min.css" rel="stylesheet" append-hash="true" id="quarto-bootstrap" data-mode="light">
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
<script type="text/javascript">
const typesetMath = (el) => {
if (window.MathJax) {
// MathJax Typeset
window.MathJax.typeset([el]);
} else if (window.katex) {
// KaTeX Render
var mathElements = el.getElementsByClassName("math");
var macros = [];
for (var i = 0; i < mathElements.length; i++) {
var texText = mathElements[i].firstChild;
if (mathElements[i].tagName == "SPAN") {
window.katex.render(texText.data, mathElements[i], {
displayMode: mathElements[i].classList.contains('display'),
throwOnError: false,
macros: macros,
fleqn: false
});
}
}
}
}
window.Quarto = {
typesetMath
};
</script>
</head>
<body class="fullcontent quarto-light">
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<main class="content" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Slides</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>There are 25 repondents with <code>follow.up = 0</code>, 21 of which with <code>death = 0</code> and other 4 with <code>death = 1</code>.</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>dat[dat<span class="sc">$</span>follow.up <span class="sc">==</span> <span class="dv">0</span>, ] <span class="sc">|&gt;</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(death) <span class="sc">|&gt;</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(<span class="at">n =</span> <span class="fu">n</span>())</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 2 × 2
death n
&lt;int&gt; &lt;int&gt;
1 0 21
2 1 4</code></pre>
</div>
</div>
<p>Reasons to omit them, that is, have <code>dat &lt;- dat[dat$follow.up &gt; 0,]</code> at the very beginning:</p>
<ul>
<li>If <code>death = 1</code>, transplant failed. They shouldnt be included in the research question “survival rate of a <em>successful</em> tranplant”.</li>
<li>If <code>death = 0</code>, transplant was successful, but they were immediately removed from populatoin at risk, contributiong nothing to the analysis.</li>
</ul>
</div>
</div>
<section id="title" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> Title</h1>
</section>
<section id="table-of-contents" class="level1" data-number="2">
<h1 data-number="2"><span class="header-section-number">2</span> Table of Contents (?)</h1>
</section>
<section id="introduction-m" class="level1" data-number="3">
<h1 data-number="3"><span class="header-section-number">3</span> Introduction (M)</h1>
</section>
<section id="method-result" class="level1" data-number="4">
<h1 data-number="4"><span class="header-section-number">4</span> Method &amp; Result</h1>
<section id="identify-predictors-m" class="level2" data-number="4.1">
<h2 data-number="4.1" class="anchored" data-anchor-id="identify-predictors-m"><span class="header-section-number">4.1</span> Identify Predictors (M)</h2>
<ul>
<li>Data source</li>
<li>Study population</li>
</ul>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>[1] 9775</code></pre>
</div>
</div>
<ul>
<li>Covariates</li>
<li>Outcome</li>
</ul>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>[1] "hla.match" "age.donor" "age.rec" "cold.isc" "death" "year"
[7] "sex" "tx.type" "follow.up"</code></pre>
</div>
</div>
</section>
<section id="table-l" class="level2" data-number="4.2">
<h2 data-number="4.2" class="anchored" data-anchor-id="table-l"><span class="header-section-number">4.2</span> Table (L)</h2>
<div class="cell">
<div class="cell-output-display">
<div id="qsvenzfqqw" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#qsvenzfqqw table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#qsvenzfqqw thead, #qsvenzfqqw tbody, #qsvenzfqqw tfoot, #qsvenzfqqw tr, #qsvenzfqqw td, #qsvenzfqqw th {
border-style: none;
}
#qsvenzfqqw p {
margin: 0;
padding: 0;
}
#qsvenzfqqw .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#qsvenzfqqw .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#qsvenzfqqw .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#qsvenzfqqw .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#qsvenzfqqw .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#qsvenzfqqw .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#qsvenzfqqw .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#qsvenzfqqw .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#qsvenzfqqw .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#qsvenzfqqw .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#qsvenzfqqw .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#qsvenzfqqw .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#qsvenzfqqw .gt_spanner_row {
border-bottom-style: hidden;
}
#qsvenzfqqw .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#qsvenzfqqw .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#qsvenzfqqw .gt_from_md > :first-child {
margin-top: 0;
}
#qsvenzfqqw .gt_from_md > :last-child {
margin-bottom: 0;
}
#qsvenzfqqw .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#qsvenzfqqw .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#qsvenzfqqw .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#qsvenzfqqw .gt_row_group_first td {
border-top-width: 2px;
}
#qsvenzfqqw .gt_row_group_first th {
border-top-width: 2px;
}
#qsvenzfqqw .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#qsvenzfqqw .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#qsvenzfqqw .gt_first_summary_row.thick {
border-top-width: 2px;
}
#qsvenzfqqw .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#qsvenzfqqw .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#qsvenzfqqw .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#qsvenzfqqw .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#qsvenzfqqw .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#qsvenzfqqw .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#qsvenzfqqw .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#qsvenzfqqw .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#qsvenzfqqw .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#qsvenzfqqw .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#qsvenzfqqw .gt_left {
text-align: left;
}
#qsvenzfqqw .gt_center {
text-align: center;
}
#qsvenzfqqw .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#qsvenzfqqw .gt_font_normal {
font-weight: normal;
}
#qsvenzfqqw .gt_font_bold {
font-weight: bold;
}
#qsvenzfqqw .gt_font_italic {
font-style: italic;
}
#qsvenzfqqw .gt_super {
font-size: 65%;
}
#qsvenzfqqw .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#qsvenzfqqw .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#qsvenzfqqw .gt_indent_1 {
text-indent: 5px;
}
#qsvenzfqqw .gt_indent_2 {
text-indent: 10px;
}
#qsvenzfqqw .gt_indent_3 {
text-indent: 15px;
}
#qsvenzfqqw .gt_indent_4 {
text-indent: 20px;
}
#qsvenzfqqw .gt_indent_5 {
text-indent: 25px;
}
#qsvenzfqqw .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#qsvenzfqqw div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<colgroup>
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
<col style="width: 25%">
</colgroup>
<thead>
<tr class="gt_col_headings header">
<th id="label" class="gt_col_heading gt_columns_bottom_border gt_left" data-quarto-table-cell-role="th" scope="col"><strong>Characteristic</strong></th>
<th id="stat_0" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col"><strong>Overall</strong><br>
N = 9,775</th>
<th id="stat_1" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col"><strong>Cadaveric</strong><br>
N = 5,148</th>
<th id="stat_2" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col"><strong>Living</strong><br>
N = 4,627</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_left" headers="label">Sex, n(%)</td>
<td class="gt_row gt_center" headers="stat_0"><br>
</td>
<td class="gt_row gt_center" headers="stat_1"><br>
</td>
<td class="gt_row gt_center" headers="stat_2"><br>
</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Female</td>
<td class="gt_row gt_center" headers="stat_0">4,014 (41%)</td>
<td class="gt_row gt_center" headers="stat_1">2,105 (41%)</td>
<td class="gt_row gt_center" headers="stat_2">1,909 (41%)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Male</td>
<td class="gt_row gt_center" headers="stat_0">5,761 (59%)</td>
<td class="gt_row gt_center" headers="stat_1">3,043 (59%)</td>
<td class="gt_row gt_center" headers="stat_2">2,718 (59%)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">Recipient age, median (IQR)</td>
<td class="gt_row gt_center" headers="stat_0">13 (8, 16)</td>
<td class="gt_row gt_center" headers="stat_1">13 (7, 16)</td>
<td class="gt_row gt_center" headers="stat_2">14 (9, 16)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Unknown</td>
<td class="gt_row gt_center" headers="stat_0">9</td>
<td class="gt_row gt_center" headers="stat_1">7</td>
<td class="gt_row gt_center" headers="stat_2">2</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">Donor age, median (IQR)</td>
<td class="gt_row gt_center" headers="stat_0">33 (21, 41)</td>
<td class="gt_row gt_center" headers="stat_1">37 (31, 42)</td>
<td class="gt_row gt_center" headers="stat_2">22 (15, 37)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Unknown</td>
<td class="gt_row gt_center" headers="stat_0">113</td>
<td class="gt_row gt_center" headers="stat_1">112</td>
<td class="gt_row gt_center" headers="stat_2">1</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">HLA matches, n(%)</td>
<td class="gt_row gt_center" headers="stat_0"><br>
</td>
<td class="gt_row gt_center" headers="stat_1"><br>
</td>
<td class="gt_row gt_center" headers="stat_2"><br>
</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;0</td>
<td class="gt_row gt_center" headers="stat_0">784 (8.2%)</td>
<td class="gt_row gt_center" headers="stat_1">125 (2.5%)</td>
<td class="gt_row gt_center" headers="stat_2">659 (14%)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;1</td>
<td class="gt_row gt_center" headers="stat_0">1,504 (16%)</td>
<td class="gt_row gt_center" headers="stat_1">160 (3.2%)</td>
<td class="gt_row gt_center" headers="stat_2">1,344 (29%)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;2</td>
<td class="gt_row gt_center" headers="stat_0">1,553 (16%)</td>
<td class="gt_row gt_center" headers="stat_1">228 (4.6%)</td>
<td class="gt_row gt_center" headers="stat_2">1,325 (29%)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;3</td>
<td class="gt_row gt_center" headers="stat_0">3,778 (40%)</td>
<td class="gt_row gt_center" headers="stat_1">3,039 (61%)</td>
<td class="gt_row gt_center" headers="stat_2">739 (16%)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;4</td>
<td class="gt_row gt_center" headers="stat_0">1,278 (13%)</td>
<td class="gt_row gt_center" headers="stat_1">1,007 (20%)</td>
<td class="gt_row gt_center" headers="stat_2">271 (5.9%)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;5</td>
<td class="gt_row gt_center" headers="stat_0">365 (3.8%)</td>
<td class="gt_row gt_center" headers="stat_1">241 (4.9%)</td>
<td class="gt_row gt_center" headers="stat_2">124 (2.7%)</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;6</td>
<td class="gt_row gt_center" headers="stat_0">279 (2.9%)</td>
<td class="gt_row gt_center" headers="stat_1">153 (3.1%)</td>
<td class="gt_row gt_center" headers="stat_2">126 (2.7%)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Unknown</td>
<td class="gt_row gt_center" headers="stat_0">234</td>
<td class="gt_row gt_center" headers="stat_1">195</td>
<td class="gt_row gt_center" headers="stat_2">39</td>
</tr>
<tr class="odd">
<td class="gt_row gt_left" headers="label">Cold ischemic time (hours), median (IQR),</td>
<td class="gt_row gt_center" headers="stat_0">7 (1, 19)</td>
<td class="gt_row gt_center" headers="stat_1">1 (0, 1)</td>
<td class="gt_row gt_center" headers="stat_2">19 (13, 25)</td>
</tr>
<tr class="even">
<td class="gt_row gt_left" headers="label">&nbsp;&nbsp;&nbsp;&nbsp;Unknown</td>
<td class="gt_row gt_center" headers="stat_0">2,250</td>
<td class="gt_row gt_center" headers="stat_1">1,490</td>
<td class="gt_row gt_center" headers="stat_2">760</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</section>
<section id="elementary-analysis-transplant-type-l" class="level1" data-number="5">
<h1 data-number="5"><span class="header-section-number">5</span> Elementary Analysis: Transplant Type (L)</h1>
<section id="transplant-type-vs-sex" class="level2" data-number="5.1">
<h2 data-number="5.1" class="anchored" data-anchor-id="transplant-type-vs-sex"><span class="header-section-number">5.1</span> Transplant Type vs Sex</h2>
<p><code>sex</code> are similar across <code>tx.type</code></p>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-8-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="transplant-type-vs-recipient-age" class="level2" data-number="5.2">
<h2 data-number="5.2" class="anchored" data-anchor-id="transplant-type-vs-recipient-age"><span class="header-section-number">5.2</span> Transplant Type vs Recipient Age</h2>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-9-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
</section>
<section id="elementary-analysis-transplant-type-cont." class="level1" data-number="6">
<h1 data-number="6"><span class="header-section-number">6</span> Elementary Analysis: Transplant Type (Cont.)</h1>
<section id="transplant-type-vs-hla-match" class="level2" data-number="6.1">
<h2 data-number="6.1" class="anchored" data-anchor-id="transplant-type-vs-hla-match"><span class="header-section-number">6.1</span> Transplant Type vs HLA Match</h2>
<p>Living donors have less <code>hla.match</code> then cadaveric donors.</p>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-10-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="transplant-type-vs-donor-age" class="level2" data-number="6.2">
<h2 data-number="6.2" class="anchored" data-anchor-id="transplant-type-vs-donor-age"><span class="header-section-number">6.2</span> Transplant Type vs Donor Age</h2>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-11-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
</section>
<section id="overall-kaplan-meier-curve" class="level1" data-number="7">
<h1 data-number="7"><span class="header-section-number">7</span> Overall Kaplan-Meier Curve</h1>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-13-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div id="ghhayaugts" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#ghhayaugts table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#ghhayaugts thead, #ghhayaugts tbody, #ghhayaugts tfoot, #ghhayaugts tr, #ghhayaugts td, #ghhayaugts th {
border-style: none;
}
#ghhayaugts p {
margin: 0;
padding: 0;
}
#ghhayaugts .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 15px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#ghhayaugts .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#ghhayaugts .gt_title {
color: #333333;
font-size: 20px;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#ghhayaugts .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#ghhayaugts .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#ghhayaugts .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#ghhayaugts .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#ghhayaugts .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: bold;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#ghhayaugts .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: bold;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#ghhayaugts .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#ghhayaugts .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#ghhayaugts .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#ghhayaugts .gt_spanner_row {
border-bottom-style: hidden;
}
#ghhayaugts .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#ghhayaugts .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#ghhayaugts .gt_from_md > :first-child {
margin-top: 0;
}
#ghhayaugts .gt_from_md > :last-child {
margin-bottom: 0;
}
#ghhayaugts .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#ghhayaugts .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#ghhayaugts .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#ghhayaugts .gt_row_group_first td {
border-top-width: 2px;
}
#ghhayaugts .gt_row_group_first th {
border-top-width: 2px;
}
#ghhayaugts .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#ghhayaugts .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#ghhayaugts .gt_first_summary_row.thick {
border-top-width: 2px;
}
#ghhayaugts .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#ghhayaugts .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#ghhayaugts .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#ghhayaugts .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#ghhayaugts .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#ghhayaugts .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#ghhayaugts .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#ghhayaugts .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#ghhayaugts .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#ghhayaugts .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#ghhayaugts .gt_left {
text-align: left;
}
#ghhayaugts .gt_center {
text-align: center;
}
#ghhayaugts .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#ghhayaugts .gt_font_normal {
font-weight: normal;
}
#ghhayaugts .gt_font_bold {
font-weight: bold;
}
#ghhayaugts .gt_font_italic {
font-style: italic;
}
#ghhayaugts .gt_super {
font-size: 65%;
}
#ghhayaugts .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#ghhayaugts .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#ghhayaugts .gt_indent_1 {
text-indent: 5px;
}
#ghhayaugts .gt_indent_2 {
text-indent: 10px;
}
#ghhayaugts .gt_indent_3 {
text-indent: 15px;
}
#ghhayaugts .gt_indent_4 {
text-indent: 20px;
}
#ghhayaugts .gt_indent_5 {
text-indent: 25px;
}
#ghhayaugts .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#ghhayaugts div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading header">
<th colspan="3" class="gt_heading gt_title gt_font_normal gt_bottom_border">Overall Kaplan-Meier Survival Summary</th>
</tr>
<tr class="gt_col_headings even">
<th id="time" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" scope="col">Follow-up Time</th>
<th id="n.risk" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" scope="col">Number at Risk</th>
<th id="surv" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" scope="col">Survival Probability</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_right" headers="time">0</td>
<td class="gt_row gt_right" headers="n.risk">9775</td>
<td class="gt_row gt_right" headers="surv">1.000</td>
</tr>
<tr class="even">
<td class="gt_row gt_right" headers="time">2</td>
<td class="gt_row gt_right" headers="n.risk">6451</td>
<td class="gt_row gt_right" headers="surv">0.968</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time">4</td>
<td class="gt_row gt_right" headers="n.risk">4150</td>
<td class="gt_row gt_right" headers="surv">0.953</td>
</tr>
<tr class="even">
<td class="gt_row gt_right" headers="time">6</td>
<td class="gt_row gt_right" headers="n.risk">2398</td>
<td class="gt_row gt_right" headers="surv">0.937</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time">8</td>
<td class="gt_row gt_right" headers="n.risk">1197</td>
<td class="gt_row gt_right" headers="surv">0.919</td>
</tr>
<tr class="even">
<td class="gt_row gt_right" headers="time">10</td>
<td class="gt_row gt_right" headers="n.risk">492</td>
<td class="gt_row gt_right" headers="surv">0.901</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time">12</td>
<td class="gt_row gt_right" headers="n.risk">48</td>
<td class="gt_row gt_right" headers="surv">0.888</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div id="npikqhagsh" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#npikqhagsh table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#npikqhagsh thead, #npikqhagsh tbody, #npikqhagsh tfoot, #npikqhagsh tr, #npikqhagsh td, #npikqhagsh th {
border-style: none;
}
#npikqhagsh p {
margin: 0;
padding: 0;
}
#npikqhagsh .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFF4CC;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A83262;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A83262;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#npikqhagsh .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#npikqhagsh .gt_title {
color: #333333;
font-size: 18px;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFF4CC;
border-bottom-width: 0;
}
#npikqhagsh .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFF4CC;
border-top-width: 0;
}
#npikqhagsh .gt_heading {
background-color: #FFF4CC;
text-align: center;
border-bottom-color: #FFF4CC;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#npikqhagsh .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#npikqhagsh .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A83262;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#npikqhagsh .gt_col_heading {
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#npikqhagsh .gt_column_spanner_outer {
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#npikqhagsh .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#npikqhagsh .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#npikqhagsh .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A83262;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#npikqhagsh .gt_spanner_row {
border-bottom-style: hidden;
}
#npikqhagsh .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#npikqhagsh .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#npikqhagsh .gt_from_md > :first-child {
margin-top: 0;
}
#npikqhagsh .gt_from_md > :last-child {
margin-bottom: 0;
}
#npikqhagsh .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#npikqhagsh .gt_stub {
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#npikqhagsh .gt_stub_row_group {
color: #333333;
background-color: #FFF4CC;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#npikqhagsh .gt_row_group_first td {
border-top-width: 2px;
}
#npikqhagsh .gt_row_group_first th {
border-top-width: 2px;
}
#npikqhagsh .gt_summary_row {
color: #333333;
background-color: #FFF4CC;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#npikqhagsh .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#npikqhagsh .gt_first_summary_row.thick {
border-top-width: 2px;
}
#npikqhagsh .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#npikqhagsh .gt_grand_summary_row {
color: #333333;
background-color: #FFF4CC;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#npikqhagsh .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#npikqhagsh .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#npikqhagsh .gt_striped {
background-color: #F6E8C3;
}
#npikqhagsh .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#npikqhagsh .gt_footnotes {
color: #333333;
background-color: #FFF4CC;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#npikqhagsh .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#npikqhagsh .gt_sourcenotes {
color: #333333;
background-color: #FFF4CC;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#npikqhagsh .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#npikqhagsh .gt_left {
text-align: left;
}
#npikqhagsh .gt_center {
text-align: center;
}
#npikqhagsh .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#npikqhagsh .gt_font_normal {
font-weight: normal;
}
#npikqhagsh .gt_font_bold {
font-weight: bold;
}
#npikqhagsh .gt_font_italic {
font-style: italic;
}
#npikqhagsh .gt_super {
font-size: 65%;
}
#npikqhagsh .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#npikqhagsh .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#npikqhagsh .gt_indent_1 {
text-indent: 5px;
}
#npikqhagsh .gt_indent_2 {
text-indent: 10px;
}
#npikqhagsh .gt_indent_3 {
text-indent: 15px;
}
#npikqhagsh .gt_indent_4 {
text-indent: 20px;
}
#npikqhagsh .gt_indent_5 {
text-indent: 25px;
}
#npikqhagsh .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#npikqhagsh div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading header">
<th colspan="3" class="gt_heading gt_title gt_font_normal gt_bottom_border">Overall Kaplan-Meier Survival Summary</th>
</tr>
<tr class="gt_col_headings even">
<th id="time" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" style="background-color: #A83262; color: #FFFFFF; font-weight: bold" scope="col">Follow-up Time</th>
<th id="n.risk" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" style="background-color: #A83262; color: #FFFFFF; font-weight: bold" scope="col">Number at Risk</th>
<th id="surv" class="gt_col_heading gt_columns_bottom_border gt_right" data-quarto-table-cell-role="th" style="background-color: #A83262; color: #FFFFFF; font-weight: bold" scope="col">Survival Probability</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_right" headers="time" style="background-color: #FFF4CC">0</td>
<td class="gt_row gt_right" headers="n.risk" style="background-color: #FFF4CC">9775</td>
<td class="gt_row gt_right" headers="surv" style="background-color: #FFF4CC">1.000</td>
</tr>
<tr class="even">
<td class="gt_row gt_right gt_striped" headers="time" style="background-color: #FFF4CC">2</td>
<td class="gt_row gt_right gt_striped" headers="n.risk" style="background-color: #FFF4CC">6451</td>
<td class="gt_row gt_right gt_striped" headers="surv" style="background-color: #FFF4CC">0.968</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time" style="background-color: #FFF4CC">4</td>
<td class="gt_row gt_right" headers="n.risk" style="background-color: #FFF4CC">4150</td>
<td class="gt_row gt_right" headers="surv" style="background-color: #FFF4CC">0.953</td>
</tr>
<tr class="even">
<td class="gt_row gt_right gt_striped" headers="time" style="background-color: #FFF4CC">6</td>
<td class="gt_row gt_right gt_striped" headers="n.risk" style="background-color: #FFF4CC">2398</td>
<td class="gt_row gt_right gt_striped" headers="surv" style="background-color: #FFF4CC">0.937</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time" style="background-color: #FFF4CC">8</td>
<td class="gt_row gt_right" headers="n.risk" style="background-color: #FFF4CC">1197</td>
<td class="gt_row gt_right" headers="surv" style="background-color: #FFF4CC">0.919</td>
</tr>
<tr class="even">
<td class="gt_row gt_right gt_striped" headers="time" style="background-color: #FFF4CC">10</td>
<td class="gt_row gt_right gt_striped" headers="n.risk" style="background-color: #FFF4CC">492</td>
<td class="gt_row gt_right gt_striped" headers="surv" style="background-color: #FFF4CC">0.901</td>
</tr>
<tr class="odd">
<td class="gt_row gt_right" headers="time" style="background-color: #FFF4CC">12</td>
<td class="gt_row gt_right" headers="n.risk" style="background-color: #FFF4CC">48</td>
<td class="gt_row gt_right" headers="surv" style="background-color: #FFF4CC">0.888</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="cox-model-with-intervals" class="level1" data-number="8">
<h1 data-number="8"><span class="header-section-number">8</span> Cox Model (with intervals?)</h1>
</section>
<section id="cox-model-transplant-type" class="level1" data-number="9">
<h1 data-number="9"><span class="header-section-number">9</span> Cox Model: Transplant Type</h1>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ tx.type, data = dat)
n= 9775, number of events= 465
coef exp(coef) se(coef) z Pr(&gt;|z|)
tx.typeLiving 0.64469 1.90539 0.09558 6.745 1.53e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
tx.typeLiving 1.905 0.5248 1.58 2.298
Concordance= 0.586 (se = 0.012 )
Likelihood ratio test= 47.1 on 1 df, p=7e-12
Wald test = 45.5 on 1 df, p=2e-11
Score (logrank) test = 47.09 on 1 df, p=7e-12</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-19-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call: survfit(formula = Surv(follow.up, death) ~ tx.type, data = dat)
tx.type=Cadaveric
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 5148 0 1.000 0.00000 1.000 1.000
4 2297 130 0.967 0.00294 0.961 0.973
8 711 34 0.943 0.00514 0.933 0.953
12 27 13 0.908 0.01135 0.886 0.931
tx.type=Living
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 4627 4 0.999 0.000432 0.998 1.000
4 1853 225 0.937 0.004212 0.928 0.945
8 486 52 0.891 0.007720 0.876 0.906
12 21 7 0.864 0.013257 0.838 0.890</code></pre>
</div>
</div>
</section>
<section id="cox-model-age-recipient-continuous" class="level1" data-number="10">
<h1 data-number="10"><span class="header-section-number">10</span> Cox Model: Age Recipient (Continuous)</h1>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ age.rec, data = dat)
n= 9766, number of events= 464
(9 observations deleted due to missingness)
coef exp(coef) se(coef) z Pr(&gt;|z|)
age.rec -0.042550 0.958342 0.008434 -5.045 4.53e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
age.rec 0.9583 1.043 0.9426 0.9743
Concordance= 0.586 (se = 0.016 )
Likelihood ratio test= 24.81 on 1 df, p=6e-07
Wald test = 25.45 on 1 df, p=5e-07
Score (logrank) test = 25.75 on 1 df, p=4e-07</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-23-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<details>
<summary>
View life table
</summary>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call: survfit(formula = Surv(follow.up, death) ~ age.rec, data = dat)
9 observations deleted due to missingness
age.rec=0
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 93 1 0.989 0.0107 0.969 1.00
4 34 17 0.784 0.0460 0.699 0.88
8 13 0 0.784 0.0460 0.699 0.88
age.rec=1
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 394 0 1.000 0.0000 1.000 1.000
4 158 32 0.900 0.0173 0.866 0.934
8 60 3 0.876 0.0217 0.835 0.920
12 1 0 0.876 0.0217 0.835 0.920
age.rec=2
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 381 0 1.000 0.0000 1.000 1.000
4 161 26 0.917 0.0160 0.886 0.949
8 73 2 0.899 0.0204 0.859 0.939
12 1 2 0.860 0.0336 0.797 0.929
age.rec=3
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 277 0 1.000 0.0000 1.000 1.000
4 130 15 0.938 0.0157 0.907 0.969
8 44 2 0.915 0.0223 0.872 0.960
age.rec=4
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 279 0 1.000 0.0000 1.000 1.000
4 129 14 0.942 0.0151 0.913 0.972
8 44 5 0.895 0.0257 0.846 0.947
12 1 0 0.895 0.0257 0.846 0.947
age.rec=5
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 286 0 1.000 0.0000 1.000 1.000
4 133 10 0.955 0.0141 0.928 0.983
8 49 3 0.920 0.0251 0.872 0.971
12 4 1 0.898 0.0330 0.835 0.965
age.rec=6
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 302 0 1.000 0.0000 1.000 1.000
4 140 10 0.961 0.0123 0.937 0.985
8 53 0 0.961 0.0123 0.937 0.985
12 2 0 0.961 0.0123 0.937 0.985
age.rec=7
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 333 0 1.000 0.0000 1.000 1.000
4 162 14 0.948 0.0140 0.921 0.976
8 62 2 0.932 0.0177 0.898 0.967
12 3 2 0.859 0.0546 0.759 0.973
age.rec=8
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 371 0 1.000 0.0000 1.000 1.000
4 183 12 0.964 0.0102 0.944 0.984
8 72 3 0.935 0.0199 0.897 0.975
12 1 3 0.869 0.0416 0.791 0.954
age.rec=9
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 388 0 1.000 0.0000 1.000 1.000
4 171 12 0.953 0.0137 0.927 0.980
8 63 7 0.891 0.0268 0.840 0.945
12 5 0 0.891 0.0268 0.840 0.945
age.rec=10
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 430 1 0.998 0.00232 0.993 1.000
4 203 7 0.976 0.00876 0.959 0.993
8 69 4 0.943 0.01874 0.907 0.981
12 3 2 0.846 0.06716 0.725 0.989
age.rec=11
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 443 0 1.000 0.0000 1.000 1.000
4 198 8 0.976 0.0087 0.959 0.993
8 63 6 0.921 0.0242 0.875 0.970
12 4 1 0.881 0.0455 0.796 0.975
age.rec=12
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 541 1 0.998 0.00185 0.995 1.000
4 246 15 0.963 0.00943 0.944 0.981
8 69 5 0.933 0.01684 0.900 0.966
12 2 1 0.904 0.03300 0.841 0.971
age.rec=13
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 644 0 1.000 0.00000 1.000 1.000
4 282 22 0.954 0.00981 0.935 0.974
8 57 4 0.922 0.02042 0.883 0.963
12 4 2 0.872 0.04013 0.796 0.954
age.rec=14
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 685 0 1.000 0.00000 1.000 1.000
4 303 15 0.971 0.00753 0.957 0.986
8 59 4 0.945 0.01537 0.916 0.976
12 2 1 0.909 0.03860 0.837 0.988
age.rec=15
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 874 1 0.999 0.00114 0.997 1.000
4 336 36 0.945 0.00910 0.927 0.963
8 66 6 0.918 0.01432 0.890 0.946
12 3 0 0.918 0.01432 0.890 0.946
age.rec=16
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 935 0 1.000 0.0000 1.000 1.000
4 375 29 0.956 0.0082 0.941 0.973
8 86 8 0.924 0.0145 0.896 0.953
12 4 0 0.924 0.0145 0.896 0.953
age.rec=17
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 1073 0 1.000 0.00000 1.000 1.000
4 410 28 0.961 0.00753 0.946 0.976
8 90 16 0.889 0.02020 0.850 0.929
12 1 2 0.854 0.03175 0.794 0.918
age.rec=18
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 1037 0 1.000 0.00000 1.000 1.000
4 395 32 0.955 0.00802 0.940 0.971
8 104 6 0.931 0.01309 0.906 0.957
12 7 2 0.905 0.02210 0.863 0.949</code></pre>
</div>
</div>
</details>
</section>
<section id="cox-model-age-recipient-categorical" class="level1" data-number="11">
<h1 data-number="11"><span class="header-section-number">11</span> Cox Model: Age Recipient (Categorical)</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>cox.age.rec.group</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ age.rec.group, data = dat.age.rec.group)
coef exp(coef) se(coef) z p
age.rec.group2-5 -0.5947 0.5517 0.1767 -3.366 0.000764
age.rec.group6-10 -1.0578 0.3472 0.1776 -5.956 2.59e-09
age.rec.group11-18 -1.0192 0.3609 0.1513 -6.736 1.63e-11
Likelihood ratio test=44.93 on 3 df, p=9.559e-10
n= 9766, number of events= 464
(9 observations deleted due to missingness)</code></pre>
</div>
</div>
<div class="cell">
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>eme.age.rec.group <span class="ot">&lt;-</span> <span class="fu">emmeans</span>(cox.age.rec.group, pairwise <span class="sc">~</span> age.rec.group,</span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="at">type =</span> <span class="st">"response"</span>)</span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a>eme.age.rec.group</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>$emmeans
age.rec.group response SE df asymp.LCL asymp.UCL
0-1 1.000 0.0000 Inf 1.000 1.000
2-5 0.552 0.0975 Inf 0.390 0.780
6-10 0.347 0.0617 Inf 0.245 0.492
11-18 0.361 0.0546 Inf 0.268 0.485
Confidence level used: 0.95
Intervals are back-transformed from the log scale
$contrasts
contrast ratio SE df null z.ratio p.value
(0-1) / (2-5) 1.813 0.320 Inf 1 3.366 0.0043
(0-1) / (6-10) 2.880 0.511 Inf 1 5.956 &lt;.0001
(0-1) / (11-18) 2.771 0.419 Inf 1 6.736 &lt;.0001
(2-5) / (6-10) 1.589 0.251 Inf 1 2.928 0.0179
(2-5) / (11-18) 1.529 0.196 Inf 1 3.314 0.0051
(6-10) / (11-18) 0.962 0.124 Inf 1 -0.298 0.9908
P value adjustment: tukey method for comparing a family of 4 estimates
Tests are performed on the log scale </code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-29-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-30-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="identifying-predictors" class="level1" data-number="12">
<h1 data-number="12"><span class="header-section-number">12</span> Identifying Predictors</h1>
<section id="start-with-nothing" class="level2" data-number="12.1">
<h2 data-number="12.1" class="anchored" data-anchor-id="start-with-nothing"><span class="header-section-number">12.1</span> Start with nothing</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb13"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>()</span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"tx.type"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.64466 1.90534 0.09558 6.745 1.53e-11
Likelihood ratio test=47.1 on 1 df, p=6.742e-12
n= 9775, number of events= 465 </code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 45.49594 1 1.529554e-11</code></pre>
</div>
<div class="sourceCode cell-code" id="cb16"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"hla.match"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
hla.match -0.2096 0.8109 0.0351 -5.972 2.34e-09
Likelihood ratio test=35.87 on 1 df, p=2.112e-09
n= 9541, number of events= 451
(234 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 35.6703 1 2.336993e-09</code></pre>
</div>
<div class="sourceCode cell-code" id="cb19"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.donor"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
age.donor -0.021738 0.978497 0.003467 -6.269 3.62e-10
Likelihood ratio test=38.96 on 1 df, p=4.319e-10
n= 9662, number of events= 464
(113 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 39.30567 1 3.62387e-10</code></pre>
</div>
<div class="sourceCode cell-code" id="cb22"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.rec"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
age.rec -0.042545 0.958348 0.008434 -5.045 4.54e-07
Likelihood ratio test=24.8 on 1 df, p=6.362e-07
n= 9766, number of events= 464
(9 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 25.44856 1 4.543371e-07</code></pre>
</div>
<div class="sourceCode cell-code" id="cb25"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb25-1"><a href="#cb25-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
cold.isc 0.019094 1.019278 0.004052 4.712 2.45e-06
Likelihood ratio test=20.88 on 1 df, p=4.888e-06
n= 7525, number of events= 357
(2250 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 22.20574 1 2.449402e-06</code></pre>
</div>
<div class="sourceCode cell-code" id="cb28"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb28-1"><a href="#cb28-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
sexMale -0.08422 0.91923 0.09374 -0.898 0.369
Likelihood ratio test=0.8 on 1 df, p=0.37
n= 9775, number of events= 465 </code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.8072063 1 0.3689475</code></pre>
</div>
<div class="sourceCode cell-code" id="cb31"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb31-1"><a href="#cb31-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"year"</span>, <span class="dv">1</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
year -0.03667 0.96399 0.01550 -2.366 0.018
Likelihood ratio test=5.62 on 1 df, p=0.0178
n= 9775, number of events= 465 </code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 5.595603 1 0.01800561</code></pre>
</div>
</div>
</section>
<section id="tx.type" class="level2" data-number="12.2">
<h2 data-number="12.2" class="anchored" data-anchor-id="tx.type"><span class="header-section-number">12.2</span> <code>tx.type</code> + ?</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb34"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb34-1"><a href="#cb34-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"tx.type"</span>)</span>
<span id="cb34-2"><a href="#cb34-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb34-3"><a href="#cb34-3" aria-hidden="true" tabindex="-1"></a><span class="co"># test.new.var(old.vars, "hla.match", 2:7)</span></span>
<span id="cb34-4"><a href="#cb34-4" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"hla.match"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.45336 1.57359 0.11146 4.068 4.75e-05
hla.match -0.12459 0.88286 0.03959 -3.147 0.00165
Likelihood ratio test=52.43 on 2 df, p=4.122e-12
n= 9541, number of events= 451
(234 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 9.905243 1 0.001648086</code></pre>
</div>
<div class="sourceCode cell-code" id="cb37"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb37-1"><a href="#cb37-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.donor"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.478191 1.613154 0.106660 4.483 7.35e-06
age.donor -0.013523 0.986568 0.003745 -3.611 0.000305
Likelihood ratio test=59.05 on 2 df, p=1.506e-13
n= 9662, number of events= 464
(113 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 13.0412 1 0.0003047131</code></pre>
</div>
<div class="sourceCode cell-code" id="cb40"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb40-1"><a href="#cb40-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.rec"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.693775 2.001255 0.096157 7.215 5.39e-13
age.rec -0.049081 0.952104 0.008536 -5.750 8.92e-09
Likelihood ratio test=78.72 on 2 df, p=&lt; 2.2e-16
n= 9766, number of events= 464
(9 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 33.06396 1 8.917646e-09</code></pre>
</div>
<div class="sourceCode cell-code" id="cb43"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb43-1"><a href="#cb43-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.477550 1.612119 0.171044 2.792 0.00524
cold.isc 0.004924 1.004937 0.006728 0.732 0.46420
Likelihood ratio test=28.72 on 2 df, p=5.811e-07
n= 7525, number of events= 357
(2250 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.5357515 1 0.4641988</code></pre>
</div>
<div class="sourceCode cell-code" id="cb46"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb46-1"><a href="#cb46-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.64499 1.90597 0.09558 6.748 1.5e-11
sexMale -0.08657 0.91707 0.09374 -0.924 0.356
Likelihood ratio test=47.95 on 2 df, p=3.87e-11
n= 9775, number of events= 465 </code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.8528929 1 0.3557352</code></pre>
</div>
<div class="sourceCode cell-code" id="cb49"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb49-1"><a href="#cb49-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"year"</span>, <span class="dv">2</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.63806 1.89281 0.09563 6.672 2.52e-11
year -0.03310 0.96744 0.01548 -2.138 0.0325
Likelihood ratio test=51.69 on 2 df, p=5.967e-12
n= 9775, number of events= 465 </code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 4.573044 1 0.0324788</code></pre>
</div>
</div>
<p><code>age.rec</code> has the smallest <span class="math inline">\(p\)</span>-value</p>
</section>
<section id="tx.type-age.rec" class="level2" data-number="12.3">
<h2 data-number="12.3" class="anchored" data-anchor-id="tx.type-age.rec"><span class="header-section-number">12.3</span> <code>tx.type</code> + <code>age.rec</code> + ?</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb52"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb52-1"><a href="#cb52-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"tx.type"</span>, <span class="st">"age.rec"</span>)</span>
<span id="cb52-2"><a href="#cb52-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb52-3"><a href="#cb52-3" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"hla.match"</span>, <span class="dv">3</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.512664 1.669733 0.112875 4.542 5.58e-06
age.rec -0.048268 0.952878 0.008688 -5.556 2.77e-08
hla.match -0.113954 0.892299 0.039929 -2.854 0.00432
Likelihood ratio test=81.92 on 3 df, p=&lt; 2.2e-16
n= 9535, number of events= 450
(240 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 8.144605 1 0.004318947</code></pre>
</div>
<div class="sourceCode cell-code" id="cb55"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb55-1"><a href="#cb55-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.donor"</span>, <span class="dv">3</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.571325 1.770611 0.107377 5.321 1.03e-07
age.rec -0.044085 0.956872 0.008718 -5.057 4.26e-07
age.donor -0.009688 0.990359 0.003797 -2.551 0.0107
Likelihood ratio test=83.3 on 3 df, p=&lt; 2.2e-16
n= 9655, number of events= 463
(120 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 6.508773 1 0.01073435</code></pre>
</div>
<div class="sourceCode cell-code" id="cb58"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb58-1"><a href="#cb58-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">3</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.489852 1.632075 0.170731 2.869 0.00412
age.rec -0.025545 0.974779 0.010019 -2.550 0.01078
cold.isc 0.005637 1.005653 0.006709 0.840 0.40085
Likelihood ratio test=35.04 on 3 df, p=1.194e-07
n= 7519, number of events= 357
(2256 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.705761 1 0.4008547</code></pre>
</div>
<div class="sourceCode cell-code" id="cb61"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb61-1"><a href="#cb61-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">3</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.695122 2.003953 0.096164 7.229 4.88e-13
age.rec -0.050004 0.951226 0.008569 -5.835 5.37e-09
sexMale -0.130416 0.877730 0.094113 -1.386 0.166
Likelihood ratio test=80.63 on 3 df, p=&lt; 2.2e-16
n= 9766, number of events= 464
(9 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 1.920263 1 0.1658277</code></pre>
</div>
<div class="sourceCode cell-code" id="cb64"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb64-1"><a href="#cb64-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"year"</span>, <span class="dv">3</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.687661 1.989059 0.096215 7.147 8.86e-13
age.rec -0.049029 0.952153 0.008537 -5.743 9.30e-09
year -0.033478 0.967076 0.015475 -2.163 0.0305
Likelihood ratio test=83.42 on 3 df, p=&lt; 2.2e-16
n= 9766, number of events= 464
(9 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 4.680122 1 0.03051359</code></pre>
</div>
</div>
<p><code>hla.match</code> has the smallest <span class="math inline">\(p\)</span>-value</p>
</section>
<section id="tx.type-age.rec-hla.match" class="level2" data-number="12.4">
<h2 data-number="12.4" class="anchored" data-anchor-id="tx.type-age.rec-hla.match"><span class="header-section-number">12.4</span> <code>tx.type</code> + <code>age.rec</code> + <code>hla.match</code> + ?</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb67"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb67-1"><a href="#cb67-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"tx.type"</span>, <span class="st">"age.rec"</span>, <span class="st">"hla.match"</span>)</span>
<span id="cb67-2"><a href="#cb67-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb67-3"><a href="#cb67-3" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"age.donor"</span>, <span class="dv">4</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.408204 1.504113 0.121727 3.353 0.000798
age.rec -0.043716 0.957225 0.008875 -4.926 8.39e-07
hla.match -0.107306 0.898251 0.040127 -2.674 0.007491
age.donor -0.008810 0.991229 0.003859 -2.283 0.022443
Likelihood ratio test=85.46 on 4 df, p=&lt; 2.2e-16
n= 9433, number of events= 449
(342 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 5.211086 1 0.02244331</code></pre>
</div>
<div class="sourceCode cell-code" id="cb70"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb70-1"><a href="#cb70-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">4</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.349594 1.418492 0.182948 1.911 0.0560
age.rec -0.023299 0.976970 0.010119 -2.302 0.0213
hla.match -0.071073 0.931394 0.044036 -1.614 0.1065
cold.isc 0.006428 1.006449 0.006717 0.957 0.3386
Likelihood ratio test=33.68 on 4 df, p=8.682e-07
n= 7381, number of events= 352
(2394 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.9158816 1 0.3385587</code></pre>
</div>
<div class="sourceCode cell-code" id="cb73"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb73-1"><a href="#cb73-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">4</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.515100 1.673806 0.112902 4.562 5.06e-06
age.rec -0.048944 0.952234 0.008721 -5.612 2.00e-08
hla.match -0.112940 0.893204 0.039936 -2.828 0.00468
sexMale -0.094882 0.909480 0.095783 -0.991 0.32188
Likelihood ratio test=82.9 on 4 df, p=&lt; 2.2e-16
n= 9535, number of events= 450
(240 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.9812753 1 0.3218842</code></pre>
</div>
<div class="sourceCode cell-code" id="cb76"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb76-1"><a href="#cb76-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"year"</span>, <span class="dv">4</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.494911 1.640353 0.113403 4.364 1.28e-05
age.rec -0.048129 0.953011 0.008689 -5.539 3.04e-08
hla.match -0.122559 0.884654 0.040341 -3.038 0.00238
year -0.035190 0.965422 0.015831 -2.223 0.02622
Likelihood ratio test=86.88 on 4 df, p=&lt; 2.2e-16
n= 9535, number of events= 450
(240 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 4.941346 1 0.02622161</code></pre>
</div>
</div>
<p><code>age.donor</code> has the smallest <span class="math inline">\(p\)</span>-value</p>
</section>
<section id="tx.type-age.rec-hla.match-age.donor" class="level2" data-number="12.5">
<h2 data-number="12.5" class="anchored" data-anchor-id="tx.type-age.rec-hla.match-age.donor"><span class="header-section-number">12.5</span> <code>tx.type</code> + <code>age.rec</code> + <code>hla.match</code> + <code>age.donor</code> + ?</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb79"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb79-1"><a href="#cb79-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"tx.type"</span>, <span class="st">"age.rec"</span>, <span class="st">"hla.match"</span>, <span class="st">"age.donor"</span>)</span>
<span id="cb79-2"><a href="#cb79-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb79-3"><a href="#cb79-3" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">5</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.355582 1.427011 0.188970 1.882 0.0599
age.rec -0.021491 0.978738 0.010298 -2.087 0.0369
hla.match -0.067709 0.934532 0.044223 -1.531 0.1257
age.donor -0.003508 0.996499 0.004230 -0.829 0.4069
cold.isc 0.004519 1.004530 0.006774 0.667 0.5047
Likelihood ratio test=34.04 on 5 df, p=2.333e-06
n= 7347, number of events= 351
(2428 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.445129 1 0.5046572</code></pre>
</div>
<div class="sourceCode cell-code" id="cb82"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb82-1"><a href="#cb82-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">5</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.411943 1.509748 0.121783 3.383 0.000718
age.rec -0.044462 0.956512 0.008914 -4.988 6.1e-07
hla.match -0.106379 0.899084 0.040136 -2.650 0.008038
age.donor -0.008675 0.991362 0.003862 -2.246 0.024677
sexMale -0.092710 0.911458 0.095941 -0.966 0.333885
Likelihood ratio test=86.39 on 5 df, p=&lt; 2.2e-16
n= 9433, number of events= 449
(342 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.9337712 1 0.3338849</code></pre>
</div>
<div class="sourceCode cell-code" id="cb85"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb85-1"><a href="#cb85-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"year"</span>, <span class="dv">5</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.397903 1.488700 0.121903 3.264 0.00110
age.rec -0.043831 0.957116 0.008875 -4.939 7.87e-07
hla.match -0.115648 0.890789 0.040537 -2.853 0.00433
age.donor -0.008325 0.991709 0.003854 -2.160 0.03078
year -0.033109 0.967433 0.015844 -2.090 0.03664
Likelihood ratio test=89.84 on 5 df, p=&lt; 2.2e-16
n= 9433, number of events= 449
(342 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 4.367128 1 0.0366387</code></pre>
</div>
</div>
<p><code>year</code> has the smallest <span class="math inline">\(p\)</span>-value</p>
</section>
<section id="tx.type-age.rec-hla.match-age.donor-year" class="level2" data-number="12.6">
<h2 data-number="12.6" class="anchored" data-anchor-id="tx.type-age.rec-hla.match-age.donor-year"><span class="header-section-number">12.6</span> <code>tx.type</code> + <code>age.rec</code> + <code>hla.match</code> + <code>age.donor</code> + <code>year</code></h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb88"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb88-1"><a href="#cb88-1" aria-hidden="true" tabindex="-1"></a>old.vars <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">"tx.type"</span>, <span class="st">"age.rec"</span>, <span class="st">"hla.match"</span>, <span class="st">"age.donor"</span>, <span class="st">"year"</span>)</span>
<span id="cb88-2"><a href="#cb88-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb88-3"><a href="#cb88-3" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"cold.isc"</span>, <span class="dv">6</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.381855 1.464999 0.189901 2.011 0.0443
age.rec -0.021369 0.978857 0.010295 -2.076 0.0379
hla.match -0.073960 0.928708 0.044568 -1.660 0.0970
age.donor -0.002981 0.997024 0.004226 -0.705 0.4806
year -0.037375 0.963315 0.019227 -1.944 0.0519
cold.isc 0.002743 1.002747 0.006825 0.402 0.6878
Likelihood ratio test=37.86 on 6 df, p=1.195e-06
n= 7347, number of events= 351
(2428 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.1615171 1 0.6877636</code></pre>
</div>
<div class="sourceCode cell-code" id="cb91"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb91-1"><a href="#cb91-1" aria-hidden="true" tabindex="-1"></a><span class="fu">test.new.var</span>(old.vars, <span class="st">"sex"</span>, <span class="dv">6</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = new.surv, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.401829 1.494556 0.121963 3.295 0.000985
age.rec -0.044602 0.956378 0.008916 -5.003 5.66e-07
hla.match -0.114750 0.891589 0.040546 -2.830 0.004653
age.donor -0.008185 0.991848 0.003857 -2.122 0.033833
year -0.033222 0.967324 0.015844 -2.097 0.036011
sexMale -0.094191 0.910109 0.095956 -0.982 0.326293
Likelihood ratio test=90.8 on 6 df, p=&lt; 2.2e-16
n= 9433, number of events= 449
(342 observations deleted due to missingness)</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code> Wald df p
1 0.9635531 1 0.3262933</code></pre>
</div>
</div>
<p>Neither has <span class="math inline">\(p\)</span>-value less than 0.05. Stop.</p>
</section>
</section>
<section id="full-model" class="level1" data-number="13">
<h1 data-number="13"><span class="header-section-number">13</span> Full Model</h1>
<div class="cell">
<div class="sourceCode cell-code" id="cb94"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a>cox.full</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = surv.full, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.0734859 1.0762534 0.0253724 2.896 0.00378
age.rec 0.0154431 1.0155630 0.0020497 7.534 4.9e-14
hla.match -0.0210826 0.9791381 0.0086077 -2.449 0.01431
age.donor -0.0009874 0.9990131 0.0008841 -1.117 0.26405
year 0.4429003 1.5572171 0.0057586 76.910 &lt; 2e-16
Likelihood ratio test=8440 on 5 df, p=&lt; 2.2e-16
n= 9433, number of events= 9433
(342 observations deleted due to missingness)</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-40-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<section id="what-happened-to-year" class="level2" data-number="13.1">
<h2 data-number="13.1" class="anchored" data-anchor-id="what-happened-to-year"><span class="header-section-number">13.1</span> What happened to <code>year</code>?</h2>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-41-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-42-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<p>Probabily want to omit it</p>
</section>
<section id="without-year" class="level2" data-number="13.2">
<h2 data-number="13.2" class="anchored" data-anchor-id="without-year"><span class="header-section-number">13.2</span> Without <code>year</code></h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb96"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb96-1"><a href="#cb96-1" aria-hidden="true" tabindex="-1"></a>cox.full<span class="fl">.1</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = surv.full.1, data = dat, method = "breslow")
coef exp(coef) se(coef) z p
tx.typeLiving 0.0037484 1.0037554 0.0254736 0.147 0.8830
age.rec 0.0139177 1.0140150 0.0020498 6.790 1.12e-11
hla.match -0.0854685 0.9180821 0.0089546 -9.545 &lt; 2e-16
age.donor 0.0023071 1.0023098 0.0008657 2.665 0.0077
Likelihood ratio test=172.9 on 4 df, p=&lt; 2.2e-16
n= 9433, number of events= 9433
(342 observations deleted due to missingness)</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-45-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<hr>
<p>TODO: write a more generic function (UPDATE: FAILED)</p>
<details>
</details>
<hr>
</section>
</section>
<section id="old" class="level1" data-number="14">
<h1 data-number="14"><span class="header-section-number">14</span> Old</h1>
<details>
<section id="death-censored" class="level2" data-number="14.1">
<h2 data-number="14.1" class="anchored" data-anchor-id="death-censored"><span class="header-section-number">14.1</span> Death &amp; Censored</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb98"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb98-1"><a href="#cb98-1" aria-hidden="true" tabindex="-1"></a>dat <span class="sc">|&gt;</span></span>
<span id="cb98-2"><a href="#cb98-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(death) <span class="sc">|&gt;</span></span>
<span id="cb98-3"><a href="#cb98-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(</span>
<span id="cb98-4"><a href="#cb98-4" aria-hidden="true" tabindex="-1"></a> <span class="at">n =</span> <span class="fu">n</span>(),</span>
<span id="cb98-5"><a href="#cb98-5" aria-hidden="true" tabindex="-1"></a> <span class="at">percentage =</span> <span class="fu">n</span>() <span class="sc">/</span> <span class="fu">nrow</span>(dat) <span class="sc">*</span> <span class="dv">100</span></span>
<span id="cb98-6"><a href="#cb98-6" aria-hidden="true" tabindex="-1"></a> )</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 2 × 3
death n percentage
&lt;int&gt; &lt;int&gt; &lt;dbl&gt;
1 0 9310 95.2
2 1 465 4.76</code></pre>
</div>
</div>
<p>Most of the patients (95.24%) were censored.</p>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-49-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-50-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code> hla.match age.donor age.rec cold.isc death year sex tx.type follow.up
1 2 25 15 6 0 2002 Female Living 0
2 1 42 10 11 1 1999 Female Living 0
3 1 9 14 8 0 2002 Male Living 0
4 0 35 12 26 0 2002 Male Living 0
5 2 17 12 28 1 1997 Male Living 0
6 3 44 13 1 0 2002 Male Cadaveric 0
7 1 34 12 1 0 2002 Male Cadaveric 0
8 4 38 11 2 0 2002 Female Cadaveric 0
9 0 23 10 6 0 2002 Female Living 0
10 3 26 1 1 0 2002 Male Cadaveric 0
11 NA 42 18 NA 0 2002 Male Cadaveric 0
12 4 39 9 NA 0 2002 Female Cadaveric 0
13 3 34 13 NA 0 2002 Male Cadaveric 0
14 3 NA 14 2 0 2002 Female Cadaveric 0
15 3 40 17 1 0 2002 Female Cadaveric 0
16 3 22 14 2 0 2002 Female Cadaveric 0
17 0 17 17 12 0 2002 Male Living 0
18 3 NA 7 NA 0 2002 Male Cadaveric 0
19 0 4 0 NA 1 2001 Female Living 0
20 4 NA NA 1 0 2002 Female Cadaveric 0
21 3 42 18 1 0 2002 Male Cadaveric 0
22 1 19 15 21 1 1994 Male Living 0
23 3 44 10 NA 0 2002 Male Cadaveric 0
24 0 13 14 NA 0 2001 Male Living 0
25 1 NA 6 1 0 2002 Male Cadaveric 0</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code> hla.match age.donor age.rec cold.isc death year sex tx.type follow.up
1 2 25 15 6 0 2002 Female Living 0
2 1 42 10 11 1 1999 Female Living 0
3 1 9 14 8 0 2002 Male Living 0
4 0 35 12 26 0 2002 Male Living 0
5 2 17 12 28 1 1997 Male Living 0
6 3 44 13 1 0 2002 Male Cadaveric 0</code></pre>
</div>
</div>
</section>
<section id="cox-model---age-as-a-continuous-variable" class="level2" data-number="14.2">
<h2 data-number="14.2" class="anchored" data-anchor-id="cox-model---age-as-a-continuous-variable"><span class="header-section-number">14.2</span> Cox Model - Age as a Continuous Variable</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb102"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb102-1"><a href="#cb102-1" aria-hidden="true" tabindex="-1"></a>cox.age.rec <span class="ot">&lt;-</span> <span class="fu">coxph</span>(<span class="fu">Surv</span>(follow.up, death) <span class="sc">~</span> age.rec, <span class="at">data =</span> dat)</span>
<span id="cb102-2"><a href="#cb102-2" aria-hidden="true" tabindex="-1"></a>cox.age.rec <span class="sc">|&gt;</span> <span class="fu">summary</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ age.rec, data = dat)
n= 9766, number of events= 464
(9 observations deleted due to missingness)
coef exp(coef) se(coef) z Pr(&gt;|z|)
age.rec -0.042550 0.958342 0.008434 -5.045 4.53e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
age.rec 0.9583 1.043 0.9426 0.9743
Concordance= 0.586 (se = 0.016 )
Likelihood ratio test= 24.81 on 1 df, p=6e-07
Wald test = 25.45 on 1 df, p=5e-07
Score (logrank) test = 25.75 on 1 df, p=4e-07</code></pre>
</div>
</div>
</section>
<section id="cox-model---age-as-a-categorical-variable" class="level2" data-number="14.3">
<h2 data-number="14.3" class="anchored" data-anchor-id="cox-model---age-as-a-categorical-variable"><span class="header-section-number">14.3</span> Cox Model - Age as a Categorical Variable</h2>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code> chisq df p
tx.type 2.46 1 0.11654
age.rec 36.09 1 1.9e-09
hla.match 8.63 1 0.00331
age.donor 10.88 1 0.00097
year 3.96 1 0.04666
GLOBAL 52.00 5 5.4e-10</code></pre>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-1.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-2.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-3.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-4.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-5.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-54-6.png" class="img-fluid figure-img" width="960"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="table-1-l" class="level2" data-number="14.4">
<h2 data-number="14.4" class="anchored" data-anchor-id="table-1-l"><span class="header-section-number">14.4</span> Table 1 (L)</h2>
<section id="hla-match-hla.match" class="level3" data-number="14.4.1">
<h3 data-number="14.4.1" class="anchored" data-anchor-id="hla-match-hla.match"><span class="header-section-number">14.4.1</span> HLA match <code>hla.match</code></h3>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>
0 1 2 3 4 5 6 &lt;NA&gt;
784 1504 1553 3778 1278 365 279 234 </code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-56-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-57-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>TODO: change to percentage within each <code>tx.type</code></p>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>Living donors have less <code>hla.match</code> then cadaveric donors</p>
</div>
</div>
</section>
<section id="donor-age-age.donor" class="level3" data-number="14.4.2">
<h3 data-number="14.4.2" class="anchored" data-anchor-id="donor-age-age.donor"><span class="header-section-number">14.4.2</span> Donor age <code>age.donor</code></h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb106"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb106-1"><a href="#cb106-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mean</span>(dat<span class="sc">$</span>age.donor, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 31.29952</code></pre>
</div>
<div class="sourceCode cell-code" id="cb108"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb108-1"><a href="#cb108-1" aria-hidden="true" tabindex="-1"></a><span class="fu">median</span>(dat<span class="sc">$</span>age.donor, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 33</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-59-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-60-1.png" class="img-fluid figure-img" width="768"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-61-1.png" class="img-fluid figure-img" width="768"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-62-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-63-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>There is age difference between different <code>tx.type</code></p>
</div>
</div>
</section>
<section id="recipient-age-age.rec" class="level3" data-number="14.4.3">
<h3 data-number="14.4.3" class="anchored" data-anchor-id="recipient-age-age.rec"><span class="header-section-number">14.4.3</span> Recipient Age <code>age.rec</code></h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb110"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb110-1"><a href="#cb110-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mean</span>(dat<span class="sc">$</span>age.rec, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 11.64653</code></pre>
</div>
<div class="sourceCode cell-code" id="cb112"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb112-1"><a href="#cb112-1" aria-hidden="true" tabindex="-1"></a><span class="fu">median</span>(dat<span class="sc">$</span>age.rec, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 13</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-65-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-66-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-67-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-68-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-69-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="cold-ischemia-time-cold.isc" class="level3" data-number="14.4.4">
<h3 data-number="14.4.4" class="anchored" data-anchor-id="cold-ischemia-time-cold.isc"><span class="header-section-number">14.4.4</span> Cold Ischemia Time <code>cold.isc</code></h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb114"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb114-1"><a href="#cb114-1" aria-hidden="true" tabindex="-1"></a><span class="fu">mean</span>(dat<span class="sc">$</span>cold.isc, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 10.85967</code></pre>
</div>
<div class="sourceCode cell-code" id="cb116"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb116-1"><a href="#cb116-1" aria-hidden="true" tabindex="-1"></a><span class="fu">median</span>(dat<span class="sc">$</span>cold.isc, <span class="at">na.rm =</span> <span class="cn">TRUE</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 7</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-71-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-72-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-73-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="transplant-type-tx.type" class="level3" data-number="14.4.5">
<h3 data-number="14.4.5" class="anchored" data-anchor-id="transplant-type-tx.type"><span class="header-section-number">14.4.5</span> Transplant Type <code>tx.type</code></h3>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>
Cadaveric Living &lt;NA&gt;
5148 4627 0 </code></pre>
</div>
</div>
<div class="cell">
<div class="sourceCode cell-code" id="cb119"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb119-1"><a href="#cb119-1" aria-hidden="true" tabindex="-1"></a>dat<span class="sc">$</span>tx.type <span class="sc">|&gt;</span> <span class="fu">table</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>
Cadaveric Living
5148 4627 </code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-76-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="year-year" class="level3" data-number="14.4.6">
<h3 data-number="14.4.6" class="anchored" data-anchor-id="year-year"><span class="header-section-number">14.4.6</span> Year <code>year</code></h3>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>
1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002
728 734 666 736 787 813 789 745 740 842 706 834 655 </code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-78-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-79-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-80-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-81-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-82-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
</section>
<section id="kaplan-meier" class="level2" data-number="14.5">
<h2 data-number="14.5" class="anchored" data-anchor-id="kaplan-meier"><span class="header-section-number">14.5</span> Kaplan-Meier</h2>
<section id="overall-l" class="level3" data-number="14.5.1">
<h3 data-number="14.5.1" class="anchored" data-anchor-id="overall-l"><span class="header-section-number">14.5.1</span> Overall (L)</h3>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call: survfit(formula = Surv(follow.up, death) ~ 1, data = dat)
time n.risk n.event survival std.err lower 95% CI upper 95% CI
4 4150 359 0.953 0.00252 0.948 0.958
8 1197 86 0.919 0.00449 0.910 0.928
12 48 20 0.888 0.00867 0.871 0.905</code></pre>
</div>
</div>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-84-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="tx.type-m" class="level3" data-number="14.5.2">
<h3 data-number="14.5.2" class="anchored" data-anchor-id="tx.type-m"><span class="header-section-number">14.5.2</span> <code>tx.type</code> (M)</h3>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-85-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
</section>
<section id="cox-model" class="level2" data-number="14.6">
<h2 data-number="14.6" class="anchored" data-anchor-id="cox-model"><span class="header-section-number">14.6</span> Cox Model</h2>
<section id="death-distribution" class="level3" data-number="14.6.1">
<h3 data-number="14.6.1" class="anchored" data-anchor-id="death-distribution"><span class="header-section-number">14.6.1</span> <code>death</code> Distribution (?)</h3>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-89-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="overall-l-1" class="level3" data-number="14.6.2">
<h3 data-number="14.6.2" class="anchored" data-anchor-id="overall-l-1"><span class="header-section-number">14.6.2</span> Overall (L)</h3>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>skip overall, jump directly to <code>tx.type</code></p>
</div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code># A tibble: 7 × 5
fu.interval n.censored n.event n.at.risk hazard.rate
&lt;dbl&gt; &lt;int&gt; &lt;int&gt; &lt;dbl&gt; &lt;dbl&gt;
1 0.333 830 152 9775 0.0155
2 0.667 491 37 8793 0.00421
3 1 613 27 8265 0.00327
4 2 1164 62 7625 0.00813
5 3 1143 41 6399 0.00641
6 4 1053 40 5215 0.00767
7 5 919 31 4122 0.00752</code></pre>
</div>
</div>
</section>
<section id="tx.type-m-1" class="level3" data-number="14.6.3">
<h3 data-number="14.6.3" class="anchored" data-anchor-id="tx.type-m-1"><span class="header-section-number">14.6.3</span> <code>tx.type</code> (M)</h3>
</section>
<section id="age-continuous-l" class="level3" data-number="14.6.4">
<h3 data-number="14.6.4" class="anchored" data-anchor-id="age-continuous-l"><span class="header-section-number">14.6.4</span> <code>age</code> (continuous) (L)</h3>
</section>
<section id="age-categorical-m" class="level3" data-number="14.6.5">
<h3 data-number="14.6.5" class="anchored" data-anchor-id="age-categorical-m"><span class="header-section-number">14.6.5</span> <code>age</code> (categorical) (M)</h3>
</section>
<section id="full-model-l" class="level3" data-number="14.6.6">
<h3 data-number="14.6.6" class="anchored" data-anchor-id="full-model-l"><span class="header-section-number">14.6.6</span> Full model (L)</h3>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ hla.match + tx.type,
data = dat)
n= 9541, number of events= 451
(234 observations deleted due to missingness)
coef exp(coef) se(coef) z Pr(&gt;|z|)
hla.match -0.12460 0.88285 0.03959 -3.148 0.00165 **
tx.typeLiving 0.45336 1.57359 0.11146 4.068 4.75e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
hla.match 0.8828 1.1327 0.8169 0.9541
tx.typeLiving 1.5736 0.6355 1.2648 1.9578
Concordance= 0.611 (se = 0.014 )
Likelihood ratio test= 52.43 on 2 df, p=4e-12
Wald test = 51.54 on 2 df, p=6e-12
Score (logrank) test = 53.06 on 2 df, p=3e-12</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>Call:
coxph(formula = Surv(follow.up, death) ~ hla.match * tx.type,
data = dat)
n= 9541, number of events= 451
(234 observations deleted due to missingness)
coef exp(coef) se(coef) z Pr(&gt;|z|)
hla.match -0.08577 0.91780 0.07828 -1.096 0.2732
tx.typeLiving 0.59989 1.82192 0.27919 2.149 0.0317 *
hla.match:tx.typeLiving -0.05232 0.94902 0.09086 -0.576 0.5647
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
exp(coef) exp(-coef) lower .95 upper .95
hla.match 0.9178 1.0896 0.7873 1.070
tx.typeLiving 1.8219 0.5489 1.0541 3.149
hla.match:tx.typeLiving 0.9490 1.0537 0.7942 1.134
Concordance= 0.611 (se = 0.014 )
Likelihood ratio test= 52.77 on 3 df, p=2e-11
Wald test = 52.64 on 3 df, p=2e-11
Score (logrank) test = 54.76 on 3 df, p=8e-12</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>Analysis of Deviance Table
Cox model: response is Surv(follow.up, death)
Model 1: ~ hla.match + tx.type
Model 2: ~ hla.match * tx.type
loglik Chisq Df Pr(&gt;|Chi|)
1 -3850.6
2 -3850.5 0.3327 1 0.5641</code></pre>
</div>
</div>
</section>
<section id="discussion-include-year-or-not" class="level3" data-number="14.6.7">
<h3 data-number="14.6.7" class="anchored" data-anchor-id="discussion-include-year-or-not"><span class="header-section-number">14.6.7</span> Discussion: include <code>year</code> or not?</h3>
</section>
</section>
<section id="assumption-testing" class="level2" data-number="14.7">
<h2 data-number="14.7" class="anchored" data-anchor-id="assumption-testing"><span class="header-section-number">14.7</span> Assumption Testing</h2>
<p>## Why Survival Analysis (L)</p>
<p>Motivation: study the distribution of time to event <span class="math inline">\(T\)</span>.</p>
<p>Example: time of death after kidney transplant.</p>
<div class="cell">
<div class="cell-output-display">
<div id="xzadzxkzsi" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#xzadzxkzsi table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#xzadzxkzsi thead, #xzadzxkzsi tbody, #xzadzxkzsi tfoot, #xzadzxkzsi tr, #xzadzxkzsi td, #xzadzxkzsi th {
border-style: none;
}
#xzadzxkzsi p {
margin: 0;
padding: 0;
}
#xzadzxkzsi .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#xzadzxkzsi .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#xzadzxkzsi .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#xzadzxkzsi .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#xzadzxkzsi .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#xzadzxkzsi .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#xzadzxkzsi .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#xzadzxkzsi .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#xzadzxkzsi .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#xzadzxkzsi .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#xzadzxkzsi .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#xzadzxkzsi .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#xzadzxkzsi .gt_spanner_row {
border-bottom-style: hidden;
}
#xzadzxkzsi .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#xzadzxkzsi .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#xzadzxkzsi .gt_from_md > :first-child {
margin-top: 0;
}
#xzadzxkzsi .gt_from_md > :last-child {
margin-bottom: 0;
}
#xzadzxkzsi .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#xzadzxkzsi .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#xzadzxkzsi .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#xzadzxkzsi .gt_row_group_first td {
border-top-width: 2px;
}
#xzadzxkzsi .gt_row_group_first th {
border-top-width: 2px;
}
#xzadzxkzsi .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#xzadzxkzsi .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#xzadzxkzsi .gt_first_summary_row.thick {
border-top-width: 2px;
}
#xzadzxkzsi .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#xzadzxkzsi .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#xzadzxkzsi .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#xzadzxkzsi .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#xzadzxkzsi .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#xzadzxkzsi .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#xzadzxkzsi .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#xzadzxkzsi .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#xzadzxkzsi .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#xzadzxkzsi .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#xzadzxkzsi .gt_left {
text-align: left;
}
#xzadzxkzsi .gt_center {
text-align: center;
}
#xzadzxkzsi .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#xzadzxkzsi .gt_font_normal {
font-weight: normal;
}
#xzadzxkzsi .gt_font_bold {
font-weight: bold;
}
#xzadzxkzsi .gt_font_italic {
font-style: italic;
}
#xzadzxkzsi .gt_super {
font-size: 65%;
}
#xzadzxkzsi .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#xzadzxkzsi .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#xzadzxkzsi .gt_indent_1 {
text-indent: 5px;
}
#xzadzxkzsi .gt_indent_2 {
text-indent: 10px;
}
#xzadzxkzsi .gt_indent_3 {
text-indent: 15px;
}
#xzadzxkzsi .gt_indent_4 {
text-indent: 20px;
}
#xzadzxkzsi .gt_indent_5 {
text-indent: 25px;
}
#xzadzxkzsi .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#xzadzxkzsi div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_col_headings header">
<th id="id" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">ID</th>
<th id="transplant" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Transplant</th>
<th id="death" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Death</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_center" headers="id">1</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death">2005</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">2</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death">2009</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">3</td>
<td class="gt_row gt_center" headers="transplant">2001</td>
<td class="gt_row gt_center" headers="death">2005</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">4</td>
<td class="gt_row gt_center" headers="transplant">2003</td>
<td class="gt_row gt_center" headers="death">2004</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">5</td>
<td class="gt_row gt_center" headers="transplant">2004</td>
<td class="gt_row gt_center" headers="death">2016</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-93-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<hr>
<p>We then calculate time to death for each respondents.</p>
<p>With this, all we need is to fit a linear model <code>t ~ X</code> or <code>log(t) ~ X</code></p>
<div class="cell">
<div class="cell-output-display">
<div id="dxcaywasew" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#dxcaywasew table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#dxcaywasew thead, #dxcaywasew tbody, #dxcaywasew tfoot, #dxcaywasew tr, #dxcaywasew td, #dxcaywasew th {
border-style: none;
}
#dxcaywasew p {
margin: 0;
padding: 0;
}
#dxcaywasew .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#dxcaywasew .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#dxcaywasew .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#dxcaywasew .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#dxcaywasew .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#dxcaywasew .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#dxcaywasew .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#dxcaywasew .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#dxcaywasew .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#dxcaywasew .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#dxcaywasew .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#dxcaywasew .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#dxcaywasew .gt_spanner_row {
border-bottom-style: hidden;
}
#dxcaywasew .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#dxcaywasew .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#dxcaywasew .gt_from_md > :first-child {
margin-top: 0;
}
#dxcaywasew .gt_from_md > :last-child {
margin-bottom: 0;
}
#dxcaywasew .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#dxcaywasew .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#dxcaywasew .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#dxcaywasew .gt_row_group_first td {
border-top-width: 2px;
}
#dxcaywasew .gt_row_group_first th {
border-top-width: 2px;
}
#dxcaywasew .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#dxcaywasew .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#dxcaywasew .gt_first_summary_row.thick {
border-top-width: 2px;
}
#dxcaywasew .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#dxcaywasew .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#dxcaywasew .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#dxcaywasew .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#dxcaywasew .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#dxcaywasew .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#dxcaywasew .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#dxcaywasew .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#dxcaywasew .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#dxcaywasew .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#dxcaywasew .gt_left {
text-align: left;
}
#dxcaywasew .gt_center {
text-align: center;
}
#dxcaywasew .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#dxcaywasew .gt_font_normal {
font-weight: normal;
}
#dxcaywasew .gt_font_bold {
font-weight: bold;
}
#dxcaywasew .gt_font_italic {
font-style: italic;
}
#dxcaywasew .gt_super {
font-size: 65%;
}
#dxcaywasew .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#dxcaywasew .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#dxcaywasew .gt_indent_1 {
text-indent: 5px;
}
#dxcaywasew .gt_indent_2 {
text-indent: 10px;
}
#dxcaywasew .gt_indent_3 {
text-indent: 15px;
}
#dxcaywasew .gt_indent_4 {
text-indent: 20px;
}
#dxcaywasew .gt_indent_5 {
text-indent: 25px;
}
#dxcaywasew .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#dxcaywasew div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_col_headings header">
<th id="id" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">ID</th>
<th id="transplant" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Transplant</th>
<th id="death" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Death</th>
<th id="t" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Time to death</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_center" headers="id">1</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death">2005</td>
<td class="gt_row gt_center" headers="t">5</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">2</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death">2009</td>
<td class="gt_row gt_center" headers="t">9</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">3</td>
<td class="gt_row gt_center" headers="transplant">2001</td>
<td class="gt_row gt_center" headers="death">2005</td>
<td class="gt_row gt_center" headers="t">4</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">4</td>
<td class="gt_row gt_center" headers="transplant">2003</td>
<td class="gt_row gt_center" headers="death">2004</td>
<td class="gt_row gt_center" headers="t">1</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">5</td>
<td class="gt_row gt_center" headers="transplant">2004</td>
<td class="gt_row gt_center" headers="death">2016</td>
<td class="gt_row gt_center" headers="t">12</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-95-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<hr>
<p>What if we do not know when exactly some respondents die?</p>
<p>Scenario 1: the study ends at the year 2008?</p>
<div class="cell">
<div class="cell-output-display">
<div id="rrfvqewnmz" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#rrfvqewnmz table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#rrfvqewnmz thead, #rrfvqewnmz tbody, #rrfvqewnmz tfoot, #rrfvqewnmz tr, #rrfvqewnmz td, #rrfvqewnmz th {
border-style: none;
}
#rrfvqewnmz p {
margin: 0;
padding: 0;
}
#rrfvqewnmz .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#rrfvqewnmz .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#rrfvqewnmz .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#rrfvqewnmz .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#rrfvqewnmz .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#rrfvqewnmz .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#rrfvqewnmz .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#rrfvqewnmz .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#rrfvqewnmz .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#rrfvqewnmz .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#rrfvqewnmz .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#rrfvqewnmz .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#rrfvqewnmz .gt_spanner_row {
border-bottom-style: hidden;
}
#rrfvqewnmz .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#rrfvqewnmz .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#rrfvqewnmz .gt_from_md > :first-child {
margin-top: 0;
}
#rrfvqewnmz .gt_from_md > :last-child {
margin-bottom: 0;
}
#rrfvqewnmz .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#rrfvqewnmz .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#rrfvqewnmz .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#rrfvqewnmz .gt_row_group_first td {
border-top-width: 2px;
}
#rrfvqewnmz .gt_row_group_first th {
border-top-width: 2px;
}
#rrfvqewnmz .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#rrfvqewnmz .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#rrfvqewnmz .gt_first_summary_row.thick {
border-top-width: 2px;
}
#rrfvqewnmz .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#rrfvqewnmz .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#rrfvqewnmz .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#rrfvqewnmz .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#rrfvqewnmz .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#rrfvqewnmz .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#rrfvqewnmz .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#rrfvqewnmz .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#rrfvqewnmz .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#rrfvqewnmz .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#rrfvqewnmz .gt_left {
text-align: left;
}
#rrfvqewnmz .gt_center {
text-align: center;
}
#rrfvqewnmz .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#rrfvqewnmz .gt_font_normal {
font-weight: normal;
}
#rrfvqewnmz .gt_font_bold {
font-weight: bold;
}
#rrfvqewnmz .gt_font_italic {
font-style: italic;
}
#rrfvqewnmz .gt_super {
font-size: 65%;
}
#rrfvqewnmz .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#rrfvqewnmz .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#rrfvqewnmz .gt_indent_1 {
text-indent: 5px;
}
#rrfvqewnmz .gt_indent_2 {
text-indent: 10px;
}
#rrfvqewnmz .gt_indent_3 {
text-indent: 15px;
}
#rrfvqewnmz .gt_indent_4 {
text-indent: 20px;
}
#rrfvqewnmz .gt_indent_5 {
text-indent: 25px;
}
#rrfvqewnmz .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#rrfvqewnmz div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_col_headings header">
<th id="id" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">ID</th>
<th id="transplant" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Transplant</th>
<th id="death_censored_txt" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Death</th>
<th id="t_1_txt" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Time to death</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_center" headers="id">1</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death_censored_txt">2005</td>
<td class="gt_row gt_center" headers="t_1_txt">5</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">2</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death_censored_txt">&gt; 2008</td>
<td class="gt_row gt_center" headers="t_1_txt">&gt; 8</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">3</td>
<td class="gt_row gt_center" headers="transplant">2001</td>
<td class="gt_row gt_center" headers="death_censored_txt">2005</td>
<td class="gt_row gt_center" headers="t_1_txt">4</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">4</td>
<td class="gt_row gt_center" headers="transplant">2003</td>
<td class="gt_row gt_center" headers="death_censored_txt">2004</td>
<td class="gt_row gt_center" headers="t_1_txt">1</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">5</td>
<td class="gt_row gt_center" headers="transplant">2004</td>
<td class="gt_row gt_center" headers="death_censored_txt">&gt; 2008</td>
<td class="gt_row gt_center" headers="t_1_txt">&gt; 4</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-98-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-98-2.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<p><strong>Right Censoring</strong>: only observe the event (death) if it occurs before a certain time (2008).</p>
<hr>
<p>Scenario 2: respondent 3 move away; loss follow up</p>
<div class="cell">
<div class="cell-output-display">
<div id="jhpcdeabse" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#jhpcdeabse table {
font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
#jhpcdeabse thead, #jhpcdeabse tbody, #jhpcdeabse tfoot, #jhpcdeabse tr, #jhpcdeabse td, #jhpcdeabse th {
border-style: none;
}
#jhpcdeabse p {
margin: 0;
padding: 0;
}
#jhpcdeabse .gt_table {
display: table;
border-collapse: collapse;
line-height: normal;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#jhpcdeabse .gt_caption {
padding-top: 4px;
padding-bottom: 4px;
}
#jhpcdeabse .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#jhpcdeabse .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 3px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#jhpcdeabse .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#jhpcdeabse .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#jhpcdeabse .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#jhpcdeabse .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#jhpcdeabse .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#jhpcdeabse .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#jhpcdeabse .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#jhpcdeabse .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#jhpcdeabse .gt_spanner_row {
border-bottom-style: hidden;
}
#jhpcdeabse .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
text-align: left;
}
#jhpcdeabse .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#jhpcdeabse .gt_from_md > :first-child {
margin-top: 0;
}
#jhpcdeabse .gt_from_md > :last-child {
margin-bottom: 0;
}
#jhpcdeabse .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#jhpcdeabse .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#jhpcdeabse .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#jhpcdeabse .gt_row_group_first td {
border-top-width: 2px;
}
#jhpcdeabse .gt_row_group_first th {
border-top-width: 2px;
}
#jhpcdeabse .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#jhpcdeabse .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#jhpcdeabse .gt_first_summary_row.thick {
border-top-width: 2px;
}
#jhpcdeabse .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#jhpcdeabse .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#jhpcdeabse .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#jhpcdeabse .gt_last_grand_summary_row_top {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: double;
border-bottom-width: 6px;
border-bottom-color: #D3D3D3;
}
#jhpcdeabse .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#jhpcdeabse .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#jhpcdeabse .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#jhpcdeabse .gt_footnote {
margin: 0px;
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#jhpcdeabse .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#jhpcdeabse .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#jhpcdeabse .gt_left {
text-align: left;
}
#jhpcdeabse .gt_center {
text-align: center;
}
#jhpcdeabse .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#jhpcdeabse .gt_font_normal {
font-weight: normal;
}
#jhpcdeabse .gt_font_bold {
font-weight: bold;
}
#jhpcdeabse .gt_font_italic {
font-style: italic;
}
#jhpcdeabse .gt_super {
font-size: 65%;
}
#jhpcdeabse .gt_footnote_marks {
font-size: 75%;
vertical-align: 0.4em;
position: initial;
}
#jhpcdeabse .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#jhpcdeabse .gt_indent_1 {
text-indent: 5px;
}
#jhpcdeabse .gt_indent_2 {
text-indent: 10px;
}
#jhpcdeabse .gt_indent_3 {
text-indent: 15px;
}
#jhpcdeabse .gt_indent_4 {
text-indent: 20px;
}
#jhpcdeabse .gt_indent_5 {
text-indent: 25px;
}
#jhpcdeabse .katex-display {
display: inline-flex !important;
margin-bottom: 0.75em !important;
}
#jhpcdeabse div.Reactable > div.rt-table > div.rt-thead > div.rt-tr.rt-tr-group-header > div.rt-th-group:after {
height: 0px !important;
}
</style>
<table class="gt_table caption-top table table-sm table-striped small" data-quarto-postprocess="true" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
<thead>
<tr class="gt_col_headings header">
<th id="id" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">ID</th>
<th id="transplant" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Transplant</th>
<th id="death_censored_txt" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Death</th>
<th id="t_1_txt" class="gt_col_heading gt_columns_bottom_border gt_center" data-quarto-table-cell-role="th" scope="col">Time to death</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr class="odd">
<td class="gt_row gt_center" headers="id">1</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death_censored_txt">2005</td>
<td class="gt_row gt_center" headers="t_1_txt">5</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">2</td>
<td class="gt_row gt_center" headers="transplant">2000</td>
<td class="gt_row gt_center" headers="death_censored_txt">&gt; 2008</td>
<td class="gt_row gt_center" headers="t_1_txt">&gt; 8</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">3</td>
<td class="gt_row gt_center" headers="transplant">2001</td>
<td class="gt_row gt_center" headers="death_censored_txt">&gt; 2005</td>
<td class="gt_row gt_center" headers="t_1_txt">&gt; 4</td>
</tr>
<tr class="even">
<td class="gt_row gt_center" headers="id">4</td>
<td class="gt_row gt_center" headers="transplant">2003</td>
<td class="gt_row gt_center" headers="death_censored_txt">2004</td>
<td class="gt_row gt_center" headers="t_1_txt">1</td>
</tr>
<tr class="odd">
<td class="gt_row gt_center" headers="id">5</td>
<td class="gt_row gt_center" headers="transplant">2004</td>
<td class="gt_row gt_center" headers="death_censored_txt">&gt; 2008</td>
<td class="gt_row gt_center" headers="t_1_txt">&gt; 4</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-100-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-100-2.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
<hr>
<p>How many patients are right censored?</p>
<div class="cell">
<div class="cell-output-display">
<div>
<figure class="figure">
<p><img src="slides_files/figure-html/unnamed-chunk-101-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section>
<section id="challenges-in-survival-analysis-l" class="level2" data-number="14.8">
<h2 data-number="14.8" class="anchored" data-anchor-id="challenges-in-survival-analysis-l"><span class="header-section-number">14.8</span> Challenges in Survival Analysis (L)</h2>
<ul>
<li><strong>Right Censoring</strong>: only observe the event if it occurs before a certain time.</li>
<li><strong>Left Censoring</strong>: event has occurred prior to the start of a research
<ul>
<li>Follow up every 3 years.</li>
<li>Event has occurred -&gt; event happened sometime before follow up.</li>
</ul></li>
<li><strong>Left Truncation</strong>: delayed entry; respondents are included only if they survived long enough.
<ul>
<li>Start follow up with patients 100 days after the transplant</li>
<li>Patients dies within 100 day wouldnt be included in the dataset</li>
</ul></li>
<li><strong>Right Truncation</strong>: respondents are included only if they have already experienced the event.
<ul>
<li>Retrospective analysis from deceased patients between 1990 and 2000.</li>
<li>Patients not dead before 2000 are not included in the dataset.</li>
</ul></li>
</ul>
</section></details>
</section>
</main>
<!-- /main column -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
placement: 'right',
icon: icon
};
anchorJS.add('.anchored');
const isCodeAnnotation = (el) => {
for (const clz of el.classList) {
if (clz.startsWith('code-annotation-')) {
return true;
}
}
return false;
}
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "Copied!");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",
offset: [0, -8]});
tooltip.show();
}
setTimeout(function() {
if (tooltip) {
tooltip.hide();
button.removeAttribute("data-bs-title");
button.removeAttribute("data-bs-toggle");
button.removeAttribute("data-bs-placement");
}
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp('/' + window.location.host + '/');
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const xrefs = window.document.querySelectorAll('a.quarto-xref');
const processXRef = (id, note) => {
// Strip column container classes
const stripColumnClz = (el) => {
el.classList.remove("page-full", "page-columns");
if (el.children) {
for (const child of el.children) {
stripColumnClz(child);
}
}
}
stripColumnClz(note)
if (id === null || id.startsWith('sec-')) {
// Special case sections, only their first couple elements
const container = document.createElement("div");
if (note.children && note.children.length > 2) {
container.appendChild(note.children[0].cloneNode(true));
for (let i = 1; i < note.children.length; i++) {
const child = note.children[i];
if (child.tagName === "P" && child.innerText === "") {
continue;
} else {
container.appendChild(child.cloneNode(true));
break;
}
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(container);
}
return container.innerHTML
} else {
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
return note.innerHTML;
}
} else {
// Remove any anchor links if they are present
const anchorLink = note.querySelector('a.anchorjs-link');
if (anchorLink) {
anchorLink.remove();
}
if (window.Quarto?.typesetMath) {
window.Quarto.typesetMath(note);
}
if (note.classList.contains("callout")) {
return note.outerHTML;
} else {
return note.innerHTML;
}
}
}
for (var i=0; i<xrefs.length; i++) {
const xref = xrefs[i];
tippyHover(xref, undefined, function(instance) {
instance.disable();
let url = xref.getAttribute('href');
let hash = undefined;
if (url.startsWith('#')) {
hash = url;
} else {
try { hash = new URL(url).hash; } catch {}
}
if (hash) {
const id = hash.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note !== null) {
try {
const html = processXRef(id, note.cloneNode(true));
instance.setContent(html);
} finally {
instance.enable();
instance.show();
}
} else {
// See if we can fetch this
fetch(url.split('#')[0])
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.getElementById(id);
if (note !== null) {
const html = processXRef(id, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
} else {
// See if we can fetch a full url (with no hash to target)
// This is a special case and we should probably do some content thinning / targeting
fetch(url)
.then(res => res.text())
.then(html => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString(html, "text/html");
const note = htmlDoc.querySelector('main.content');
if (note !== null) {
// This should only happen for chapter cross references
// (since there is no id in the URL)
// remove the first header
if (note.children.length > 0 && note.children[0].tagName === "HEADER") {
note.children[0].remove();
}
const html = processXRef(null, note);
instance.setContent(html);
}
}).finally(() => {
instance.enable();
instance.show();
});
}
}, function(instance) {
});
}
let selectedAnnoteEl;
const selectorForAnnotation = ( cell, annotation) => {
let cellAttr = 'data-code-cell="' + cell + '"';
let lineAttr = 'data-code-annotation="' + annotation + '"';
const selector = 'span[' + cellAttr + '][' + lineAttr + ']';
return selector;
}
const selectCodeLines = (annoteEl) => {
const doc = window.document;
const targetCell = annoteEl.getAttribute("data-target-cell");
const targetAnnotation = annoteEl.getAttribute("data-target-annotation");
const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation));
const lines = annoteSpan.getAttribute("data-code-lines").split(",");
const lineIds = lines.map((line) => {
return targetCell + "-" + line;
})
let top = null;
let height = null;
let parent = null;
if (lineIds.length > 0) {
//compute the position of the single el (top and bottom and make a div)
const el = window.document.getElementById(lineIds[0]);
top = el.offsetTop;
height = el.offsetHeight;
parent = el.parentElement.parentElement;
if (lineIds.length > 1) {
const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]);
const bottom = lastEl.offsetTop + lastEl.offsetHeight;
height = bottom - top;
}
if (top !== null && height !== null && parent !== null) {
// cook up a div (if necessary) and position it
let div = window.document.getElementById("code-annotation-line-highlight");
if (div === null) {
div = window.document.createElement("div");
div.setAttribute("id", "code-annotation-line-highlight");
div.style.position = 'absolute';
parent.appendChild(div);
}
div.style.top = top - 2 + "px";
div.style.height = height + 4 + "px";
div.style.left = 0;
let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter");
if (gutterDiv === null) {
gutterDiv = window.document.createElement("div");
gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter");
gutterDiv.style.position = 'absolute';
const codeCell = window.document.getElementById(targetCell);
const gutter = codeCell.querySelector('.code-annotation-gutter');
gutter.appendChild(gutterDiv);
}
gutterDiv.style.top = top - 2 + "px";
gutterDiv.style.height = height + 4 + "px";
}
selectedAnnoteEl = annoteEl;
}
};
const unselectCodeLines = () => {
const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"];
elementsIds.forEach((elId) => {
const div = window.document.getElementById(elId);
if (div) {
div.remove();
}
});
selectedAnnoteEl = undefined;
};
// Handle positioning of the toggle
window.addEventListener(
"resize",
throttle(() => {
elRect = undefined;
if (selectedAnnoteEl) {
selectCodeLines(selectedAnnoteEl);
}
}, 10)
);
function throttle(fn, ms) {
let throttle = false;
let timer;
return (...args) => {
if(!throttle) { // first call gets through
fn.apply(this, args);
throttle = true;
} else { // all the others get throttled
if(timer) clearTimeout(timer); // cancel #2
timer = setTimeout(() => {
fn.apply(this, args);
timer = throttle = false;
}, ms);
}
};
}
// Attach click handler to the DT
const annoteDls = window.document.querySelectorAll('dt[data-target-cell]');
for (const annoteDlNode of annoteDls) {
annoteDlNode.addEventListener('click', (event) => {
const clickedEl = event.target;
if (clickedEl !== selectedAnnoteEl) {
unselectCodeLines();
const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active');
if (activeEl) {
activeEl.classList.remove('code-annotation-active');
}
selectCodeLines(clickedEl);
clickedEl.classList.add('code-annotation-active');
} else {
// Unselect the line
unselectCodeLines();
clickedEl.classList.remove('code-annotation-active');
}
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
const cites = parentEl.dataset.cites;
if (cites) {
return {
el,
cites: cites.split(' ')
};
} else {
return findCites(el.parentElement)
}
} else {
return undefined;
}
};
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const citeInfo = findCites(ref);
if (citeInfo) {
tippyHover(citeInfo.el, function() {
var popup = window.document.createElement('div');
citeInfo.cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
}
});
</script>
</div> <!-- /content -->
</body></html>