update
This commit is contained in:
parent
6d492e0990
commit
8629a52530
4 changed files with 402 additions and 106 deletions
|
|
@ -19,6 +19,6 @@ git add -A
|
|||
git commit -m "Deploy static site"
|
||||
|
||||
# Push this folder as the gh-pages branch of chmee/kidney
|
||||
git push -f git@github.com:chmee/kidney.git main:gh-pages
|
||||
git push -f git@github.com:chmlee/kidney.git master:gh-pages
|
||||
|
||||
cd -
|
||||
|
|
|
|||
32
report.Rmd
32
report.Rmd
|
|
@ -14,6 +14,7 @@ library(survival)
|
|||
library(emmeans)
|
||||
library(foreign)
|
||||
library(gtsummary)
|
||||
library(ggsurvfit)
|
||||
```
|
||||
|
||||
```{r}
|
||||
|
|
@ -114,6 +115,29 @@ table.split <- dat.table1 |>
|
|||
table.split
|
||||
```
|
||||
|
||||
```{r}
|
||||
table.split <- dat.table1 |>
|
||||
select(sex, age.rec, age.donor, hla.match, cold.isc, tx.type) |>
|
||||
tbl_summary(
|
||||
by = tx.type,
|
||||
statistic = list(
|
||||
all_continuous() ~ "{median} ({p25}, {p75})"
|
||||
),
|
||||
label = list(
|
||||
hla.match ~ "HLA matches, n(%)",
|
||||
age.donor ~ "Donor age, median (IQR)",
|
||||
age.rec ~ "Recipient age, median (IQR)",
|
||||
cold.isc ~ "Cold ischemic time (hours), median (IQR), ",
|
||||
sex ~ "Sex, n(%)"
|
||||
),
|
||||
missing = "ifany"
|
||||
) |>
|
||||
add_overall() |>
|
||||
modify_footnote(all_stat_cols() ~ NA)
|
||||
|
||||
table.split
|
||||
```
|
||||
|
||||
|
||||
Calculate median follow-up (reverse Kaplan-Meier method), with 95% CI
|
||||
```{r}
|
||||
|
|
@ -367,9 +391,6 @@ recode.dat <- function(dat, time.intervals) {
|
|||
|
||||
df
|
||||
}
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```{r}
|
||||
|
|
@ -547,13 +568,16 @@ dat.age.rec$age.group <- sapply(dat.age.rec$age.rec, class.age) |>
|
|||
|
||||
|
||||
cox.age.rec <- coxph(Surv(follow.up, death) ~ age.group, data = dat.age.rec)
|
||||
cox.age.rec |> summary()
|
||||
```
|
||||
|
||||
```{r}
|
||||
emmeans(cox.age.rec, pairwise ~ age.group, type = "response")
|
||||
```
|
||||
|
||||
```{r}
|
||||
cox.age.rec |> ggsurvfit()
|
||||
```
|
||||
|
||||
|
||||
# Exercise 7
|
||||
|
||||
|
|
|
|||
|
|
@ -284,6 +284,57 @@ dat |>
|
|||
|
||||
## Explain Dataset (M)
|
||||
|
||||
::: {.callout-note}
|
||||
# Things to highlight in figures
|
||||
|
||||
- sex and recipient age are similar across `tx.type`
|
||||
|
||||
- Living donors have less `hla.match` then cadaveric donors
|
||||
|
||||
- There is age difference between different `tx.type`
|
||||
:::
|
||||
|
||||
|
||||
### `sex` ~ `tx.tpye`
|
||||
|
||||
::: {.callout-note}
|
||||
`sex` are similar across `tx.type`
|
||||
:::
|
||||
|
||||
```{r, fig.width=7, fig.height=5}
|
||||
dat |>
|
||||
count(tx.type, sex) |>
|
||||
group_by(tx.type) |>
|
||||
mutate(
|
||||
total = sum(n),
|
||||
percent = n / total
|
||||
) |>
|
||||
ungroup() |>
|
||||
ggplot() +
|
||||
geom_col(aes(x = tx.type, y = percent, fill = sex), position = "dodge") +
|
||||
labs(
|
||||
title = "Percentage of Sex in Transplant Type",
|
||||
y = "Percentage",
|
||||
x = "Transplant Type",
|
||||
fill = NULL
|
||||
|
||||
) +
|
||||
scale_x_discrete(
|
||||
labels = c("Cadaveric" = "Deceased"),
|
||||
) +
|
||||
theme_minimal() +
|
||||
theme(
|
||||
legend.position = "bottom",
|
||||
plot.title = element_text(size = 17, face = "bold"),
|
||||
axis.title = element_text(size = 15),
|
||||
axis.text = element_text(size = 10),
|
||||
legend.text = element_text(size = 12),
|
||||
plot.margin = margin(20, 30, 20, 30)
|
||||
)
|
||||
|
||||
|
||||
```
|
||||
|
||||
## Table 1 (L)
|
||||
|
||||
|
||||
|
|
@ -308,6 +359,15 @@ ggplot(dat, aes(x = hla.match, fill = tx.type)) +
|
|||
theme_minimal()
|
||||
```
|
||||
|
||||
::: {.callout-warning}
|
||||
TODO: change to percentage within each `tx.type`
|
||||
:::
|
||||
|
||||
::: {.callout-note}
|
||||
Living donors have less `hla.match` then cadaveric donors
|
||||
:::
|
||||
|
||||
|
||||
### Donor age `age.donor`
|
||||
|
||||
```{r}
|
||||
|
|
@ -323,9 +383,7 @@ ggplot(dat, aes(x = age.donor)) +
|
|||
theme_minimal()
|
||||
```
|
||||
|
||||
```{r}
|
||||
#| fig-width: 8
|
||||
#| fig-height: 12
|
||||
```{r, fig.width = 8, fig.height = 12}
|
||||
ggplot(dat, aes(x = age.donor)) +
|
||||
geom_bar() +
|
||||
labs(x = "Donor Age", y = "Count") +
|
||||
|
|
@ -333,6 +391,14 @@ ggplot(dat, aes(x = age.donor)) +
|
|||
facet_grid(hla.match ~ .)
|
||||
```
|
||||
|
||||
```{r, fig.width= 8, fig.height= 12}
|
||||
ggplot(dat, aes(x = age.donor, color = tx.type)) +
|
||||
geom_density() +
|
||||
labs(x = "Donor Age", y = "Density") +
|
||||
theme_minimal() +
|
||||
facet_grid(hla.match ~ .)
|
||||
```
|
||||
|
||||
```{r}
|
||||
ggplot(dat, aes(x = age.donor, color = hla.match)) +
|
||||
geom_density() +
|
||||
|
|
@ -340,6 +406,16 @@ ggplot(dat, aes(x = age.donor, color = hla.match)) +
|
|||
theme_minimal()
|
||||
```
|
||||
|
||||
```{r}
|
||||
ggplot(dat, aes(x = as.factor(tx.type), y = age.donor)) +
|
||||
geom_boxplot() +
|
||||
theme_minimal()
|
||||
```
|
||||
|
||||
::: {.callout-note}
|
||||
There is age difference between different `tx.type`
|
||||
:::
|
||||
|
||||
|
||||
### Recipient Age `age.rec`
|
||||
|
||||
|
|
@ -407,8 +483,19 @@ ggplot(dat, aes(x = cold.isc, color = tx.type, group = tx.type)) +
|
|||
theme_minimal()
|
||||
```
|
||||
|
||||
```{r}
|
||||
ggplot(dat, aes(x = cold.isc)) +
|
||||
geom_density() +
|
||||
theme_minimal() +
|
||||
facet_grid(tx.type ~ .)
|
||||
```
|
||||
|
||||
### Transplant Type `tx.type`
|
||||
|
||||
```{r}
|
||||
dat$tx.type |> table(useNA = "always")
|
||||
```
|
||||
|
||||
```{r}
|
||||
#| echo: true
|
||||
dat$tx.type |> table()
|
||||
|
|
@ -455,10 +542,13 @@ ggplot(dat, aes(x = year, y = age.donor)) +
|
|||
geom_boxplot()
|
||||
```
|
||||
|
||||
## Overall Kaplan-Meier
|
||||
## Kaplan-Meier
|
||||
|
||||
### Overall (L)
|
||||
|
||||
```{r}
|
||||
km_all <- survfit(Surv(follow.up, death) ~ 1, data = dat)
|
||||
summary(km_all, times = c(4, 8, 12))
|
||||
```
|
||||
|
||||
```{r}
|
||||
|
|
@ -473,7 +563,38 @@ km_all |>
|
|||
theme_minimal()
|
||||
```
|
||||
|
||||
## Hazard Functions
|
||||
### `tx.type` (M)
|
||||
|
||||
```{r, fig.width=7, fig.height=5}
|
||||
km.tx <- survfit(Surv(follow.up, death) ~ tx.type, data = dat)
|
||||
|
||||
km.tx |>
|
||||
ggsurvfit(type = "survival") +
|
||||
add_confidence_interval() +
|
||||
scale_x_continuous(
|
||||
breaks = seq(0, 20, by = 4)
|
||||
) +
|
||||
scale_y_continuous(
|
||||
limits = c(0, 1),
|
||||
breaks = seq(0, 1, by = 0.2),
|
||||
labels = scales::label_number(accuracy = 0.1)
|
||||
) +
|
||||
labs(
|
||||
x = "Years of Follow-up",
|
||||
y = "Overall Survival Probability"
|
||||
) +
|
||||
theme_minimal() +
|
||||
theme(
|
||||
legend.position = "bottom",
|
||||
plot.title = element_text(size = 17, face = "bold"),
|
||||
axis.title = element_text(size = 15),
|
||||
axis.text = element_text(size = 10),
|
||||
legend.text = element_text(size = 12),
|
||||
plot.margin = margin(20, 30, 20, 30)
|
||||
)
|
||||
```
|
||||
|
||||
## Cox Model
|
||||
|
||||
```{r}
|
||||
get.life.table <- function(dat, time.intervals) {
|
||||
|
|
@ -548,13 +669,13 @@ recode.dat <- function(dat, time.intervals) {
|
|||
### `death` Distribution (?)
|
||||
|
||||
```{r}
|
||||
dat |>
|
||||
mutate(
|
||||
accum.death = cumsum(death),
|
||||
accum.censored = if_else(death == 1, 0, 1) |> cumsum()
|
||||
) |>
|
||||
ggplot() +
|
||||
geom_step(aes(x = follow.up, y = accum.death))
|
||||
# dat |>
|
||||
# mutate(
|
||||
# accum.death = cumsum(death),
|
||||
# accum.censored = if_else(death == 1, 0, 1) |> cumsum()
|
||||
# ) |>
|
||||
# ggplot() +
|
||||
# geom_pont(aes(x = follow.up, y = accum.death, color = death))
|
||||
```
|
||||
|
||||
```{r}
|
||||
|
|
@ -569,7 +690,11 @@ plot.death
|
|||
```
|
||||
|
||||
|
||||
### Overall (?)
|
||||
### Overall (L)
|
||||
|
||||
::: {.callout-note}
|
||||
skip overall, jump directly to `tx.type`
|
||||
:::
|
||||
|
||||
```{r}
|
||||
time.intervals <- c(1/3, 1/3, 1/3, 1, 1, 1, 1)
|
||||
|
|
@ -579,13 +704,6 @@ get.life.table(dat, time.intervals)
|
|||
### `tx.type` (M)
|
||||
|
||||
|
||||
```{r}
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Cox Model
|
||||
|
||||
### `age` (continuous) (L)
|
||||
|
||||
### `age` (categorical) (M)
|
||||
|
|
@ -607,3 +725,4 @@ anova(m1, m2, test = "LRT")
|
|||
## Assumption Testing
|
||||
|
||||
# Conclusion (M + L)
|
||||
|
||||
315
slides.html
315
slides.html
|
|
@ -2214,6 +2214,48 @@ window.Quarto = {
|
|||
<h1 data-number="2"><span class="header-section-number">2</span> Method & Result</h1>
|
||||
<section id="explain-dataset-m" class="level2" data-number="2.1">
|
||||
<h2 data-number="2.1" class="anchored" data-anchor-id="explain-dataset-m"><span class="header-section-number">2.1</span> Explain Dataset (M)</h2>
|
||||
<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">
|
||||
Things to highlight in figures
|
||||
</div>
|
||||
</div>
|
||||
<div class="callout-body-container callout-body">
|
||||
<ul>
|
||||
<li><p>sex and recipient age are similar across <code>tx.type</code></p></li>
|
||||
<li><p>Living donors have less <code>hla.match</code> then cadaveric donors</p></li>
|
||||
<li><p>There is age difference between different <code>tx.type</code></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<section id="sex-tx.tpye" class="level3" data-number="2.1.1">
|
||||
<h3 data-number="2.1.1" class="anchored" data-anchor-id="sex-tx.tpye"><span class="header-section-number">2.1.1</span> <code>sex</code> ~ <code>tx.tpye</code></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><code>sex</code> are similar across <code>tx.type</code></p>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</section>
|
||||
</section>
|
||||
<section id="table-1-l" class="level2" data-number="2.2">
|
||||
<h2 data-number="2.2" class="anchored" data-anchor-id="table-1-l"><span class="header-section-number">2.2</span> Table 1 (L)</h2>
|
||||
|
|
@ -2230,7 +2272,7 @@ window.Quarto = {
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-14-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-15-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2239,11 +2281,37 @@ window.Quarto = {
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-15-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-16-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="2.2.2">
|
||||
<h3 data-number="2.2.2" class="anchored" data-anchor-id="donor-age-age.donor"><span class="header-section-number">2.2.2</span> Donor age <code>age.donor</code></h3>
|
||||
|
|
@ -2265,7 +2333,7 @@ window.Quarto = {
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-17-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-18-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2278,7 +2346,7 @@ window.Quarto = {
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-18-1.png" class="img-fluid figure-img" width="768"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-19-1.png" class="img-fluid figure-img" width="768"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2291,28 +2359,15 @@ window.Quarto = {
|
|||
<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>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-20-1.png" class="img-fluid figure-img" width="768"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="recipient-age-age.rec" class="level3" data-number="2.2.3">
|
||||
<h3 data-number="2.2.3" class="anchored" data-anchor-id="recipient-age-age.rec"><span class="header-section-number">2.2.3</span> Recipient Age <code>age.rec</code></h3>
|
||||
<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><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="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><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 cell-output-stderr">
|
||||
<pre><code>Warning: Removed 9 rows containing non-finite outside the scale range
|
||||
(`stat_count()`).</code></pre>
|
||||
<pre><code>Warning: Removed 113 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
|
|
@ -2335,23 +2390,36 @@ window.Quarto = {
|
|||
</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="2.2.3">
|
||||
<h3 data-number="2.2.3" class="anchored" data-anchor-id="recipient-age-age.rec"><span class="header-section-number">2.2.3</span> Recipient Age <code>age.rec</code></h3>
|
||||
<div class="cell">
|
||||
<div class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 9 rows containing non-finite outside the scale range
|
||||
(`stat_count()`).</code></pre>
|
||||
</div>
|
||||
<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 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><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="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><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 cell-output-stderr">
|
||||
<pre><code>Warning: Removed 9 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
(`stat_count()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
|
|
@ -2363,7 +2431,7 @@ window.Quarto = {
|
|||
</div>
|
||||
<div class="cell">
|
||||
<div class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
<pre><code>Warning: Removed 113 rows containing non-finite outside the scale range
|
||||
(`stat_boxplot()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
|
|
@ -2374,22 +2442,22 @@ window.Quarto = {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="cold-ischemia-time-cold.isc" class="level3" data-number="2.2.4">
|
||||
<h3 data-number="2.2.4" class="anchored" data-anchor-id="cold-ischemia-time-cold.isc"><span class="header-section-number">2.2.4</span> Cold Ischemia Time <code>cold.isc</code></h3>
|
||||
<div class="cell">
|
||||
<div class="sourceCode cell-code" id="cb18"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-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 class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 9 rows containing non-finite outside the scale range
|
||||
(`stat_count()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-26-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
<div class="sourceCode cell-code" id="cb20"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-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 cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
<pre><code>Warning: Removed 9 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
|
|
@ -2403,7 +2471,7 @@ window.Quarto = {
|
|||
<div class="cell">
|
||||
<div class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
(`stat_boxplot()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
|
|
@ -2414,10 +2482,69 @@ window.Quarto = {
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="cold-ischemia-time-cold.isc" class="level3" data-number="2.2.4">
|
||||
<h3 data-number="2.2.4" class="anchored" data-anchor-id="cold-ischemia-time-cold.isc"><span class="header-section-number">2.2.4</span> Cold Ischemia Time <code>cold.isc</code></h3>
|
||||
<div class="cell">
|
||||
<div class="sourceCode cell-code" id="cb20"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-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="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">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 cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
</div>
|
||||
<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>
|
||||
<div class="cell">
|
||||
<div class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-31-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="cell-output cell-output-stderr">
|
||||
<pre><code>Warning: Removed 2250 rows containing non-finite outside the scale range
|
||||
(`stat_density()`).</code></pre>
|
||||
</div>
|
||||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-32-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="2.2.5">
|
||||
<h3 data-number="2.2.5" class="anchored" data-anchor-id="transplant-type-tx.type"><span class="header-section-number">2.2.5</span> Transplant Type <code>tx.type</code></h3>
|
||||
<div class="cell">
|
||||
<div class="sourceCode cell-code" id="cb24"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a>dat<span class="sc">$</span>tx.type <span class="sc">|></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 <NA>
|
||||
5148 4627 0 </code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<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>dat<span class="sc">$</span>tx.type <span class="sc">|></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
|
||||
|
|
@ -2428,7 +2555,7 @@ Cadaveric Living
|
|||
<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>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-35-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2447,7 +2574,7 @@ Cadaveric Living
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-32-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-37-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2456,7 +2583,7 @@ Cadaveric Living
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-33-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-38-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2465,7 +2592,7 @@ Cadaveric Living
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-34-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-39-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2478,7 +2605,7 @@ Cadaveric Living
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-35-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-40-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2491,50 +2618,79 @@ Cadaveric Living
|
|||
<div class="cell-output-display">
|
||||
<div>
|
||||
<figure class="figure">
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-36-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-41-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="overall-kaplan-meier" class="level2" data-number="2.3">
|
||||
<h2 data-number="2.3" class="anchored" data-anchor-id="overall-kaplan-meier"><span class="header-section-number">2.3</span> Overall Kaplan-Meier</h2>
|
||||
<section id="kaplan-meier" class="level2" data-number="2.3">
|
||||
<h2 data-number="2.3" class="anchored" data-anchor-id="kaplan-meier"><span class="header-section-number">2.3</span> Kaplan-Meier</h2>
|
||||
<section id="overall-l" class="level3" data-number="2.3.1">
|
||||
<h3 data-number="2.3.1" class="anchored" data-anchor-id="overall-l"><span class="header-section-number">2.3.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-38-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-43-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="hazard-functions" class="level2" data-number="2.4">
|
||||
<h2 data-number="2.4" class="anchored" data-anchor-id="hazard-functions"><span class="header-section-number">2.4</span> Hazard Functions</h2>
|
||||
<section id="tx.type-m" class="level3" data-number="2.3.2">
|
||||
<h3 data-number="2.3.2" class="anchored" data-anchor-id="tx.type-m"><span class="header-section-number">2.3.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-44-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="cox-model" class="level2" data-number="2.4">
|
||||
<h2 data-number="2.4" class="anchored" data-anchor-id="cox-model"><span class="header-section-number">2.4</span> Cox Model</h2>
|
||||
<section id="death-distribution" class="level3" data-number="2.4.1">
|
||||
<h3 data-number="2.4.1" class="anchored" data-anchor-id="death-distribution"><span class="header-section-number">2.4.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-40-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>
|
||||
<p><img src="slides_files/figure-html/unnamed-chunk-48-1.png" class="img-fluid figure-img" width="672"></p>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="overall" class="level3" data-number="2.4.2">
|
||||
<h3 data-number="2.4.2" class="anchored" data-anchor-id="overall"><span class="header-section-number">2.4.2</span> Overall (?)</h3>
|
||||
<section id="overall-l-1" class="level3" data-number="2.4.2">
|
||||
<h3 data-number="2.4.2" class="anchored" data-anchor-id="overall-l-1"><span class="header-section-number">2.4.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
|
||||
|
|
@ -2550,20 +2706,17 @@ Cadaveric Living
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="tx.type-m" class="level3" data-number="2.4.3">
|
||||
<h3 data-number="2.4.3" class="anchored" data-anchor-id="tx.type-m"><span class="header-section-number">2.4.3</span> <code>tx.type</code> (M)</h3>
|
||||
<section id="tx.type-m-1" class="level3" data-number="2.4.3">
|
||||
<h3 data-number="2.4.3" class="anchored" data-anchor-id="tx.type-m-1"><span class="header-section-number">2.4.3</span> <code>tx.type</code> (M)</h3>
|
||||
</section>
|
||||
<section id="age-continuous-l" class="level3" data-number="2.4.4">
|
||||
<h3 data-number="2.4.4" class="anchored" data-anchor-id="age-continuous-l"><span class="header-section-number">2.4.4</span> <code>age</code> (continuous) (L)</h3>
|
||||
</section>
|
||||
<section id="cox-model" class="level2" data-number="2.5">
|
||||
<h2 data-number="2.5" class="anchored" data-anchor-id="cox-model"><span class="header-section-number">2.5</span> Cox Model</h2>
|
||||
<section id="age-continuous-l" class="level3" data-number="2.5.1">
|
||||
<h3 data-number="2.5.1" class="anchored" data-anchor-id="age-continuous-l"><span class="header-section-number">2.5.1</span> <code>age</code> (continuous) (L)</h3>
|
||||
<section id="age-categorical-m" class="level3" data-number="2.4.5">
|
||||
<h3 data-number="2.4.5" class="anchored" data-anchor-id="age-categorical-m"><span class="header-section-number">2.4.5</span> <code>age</code> (categorical) (M)</h3>
|
||||
</section>
|
||||
<section id="age-categorical-m" class="level3" data-number="2.5.2">
|
||||
<h3 data-number="2.5.2" class="anchored" data-anchor-id="age-categorical-m"><span class="header-section-number">2.5.2</span> <code>age</code> (categorical) (M)</h3>
|
||||
</section>
|
||||
<section id="full-model-l" class="level3" data-number="2.5.3">
|
||||
<h3 data-number="2.5.3" class="anchored" data-anchor-id="full-model-l"><span class="header-section-number">2.5.3</span> Full model (L)</h3>
|
||||
<section id="full-model-l" class="level3" data-number="2.4.6">
|
||||
<h3 data-number="2.4.6" class="anchored" data-anchor-id="full-model-l"><span class="header-section-number">2.4.6</span> Full model (L)</h3>
|
||||
<div class="cell">
|
||||
<div class="cell-output cell-output-stdout">
|
||||
<pre><code>Call:
|
||||
|
|
@ -2654,12 +2807,12 @@ Score (logrank) test = 69.92 on 13 df, p=8e-10</code></pre>
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="discussion-include-year-or-not" class="level3" data-number="2.5.4">
|
||||
<h3 data-number="2.5.4" class="anchored" data-anchor-id="discussion-include-year-or-not"><span class="header-section-number">2.5.4</span> Discussion: include <code>year</code> or not?</h3>
|
||||
<section id="discussion-include-year-or-not" class="level3" data-number="2.4.7">
|
||||
<h3 data-number="2.4.7" class="anchored" data-anchor-id="discussion-include-year-or-not"><span class="header-section-number">2.4.7</span> Discussion: include <code>year</code> or not?</h3>
|
||||
</section>
|
||||
</section>
|
||||
<section id="assumption-testing" class="level2" data-number="2.6">
|
||||
<h2 data-number="2.6" class="anchored" data-anchor-id="assumption-testing"><span class="header-section-number">2.6</span> Assumption Testing</h2>
|
||||
<section id="assumption-testing" class="level2" data-number="2.5">
|
||||
<h2 data-number="2.5" class="anchored" data-anchor-id="assumption-testing"><span class="header-section-number">2.5</span> Assumption Testing</h2>
|
||||
</section>
|
||||
</section>
|
||||
<section id="conclusion-m-l" class="level1" data-number="3">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue