Skip to content

Commit a525f64

Browse files
committed
fix input for burden episode
1 parent 32b6048 commit a525f64

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

episodes/disease-burden.Rmd

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ associated with the lessons. They appear in the "Instructor View".
6363

6464
## A burden model
6565

66-
We will extend the influenza example from the [Simulating transmission](../episodes/simulating-transmission.md) tutorial to calculate hospitalizations over time. Our approach has two main components:
66+
We will extend the influenza example from the [Simulating transmission](../episodes/simulating-transmission.md) tutorial by using the `output` object to calculate hospitalizations over time. Our approach has two main components:
6767

6868
1. **Transmission model**: An SEIR model that generates new infections over time
6969
2. **Burden model**: Converts new infections to hospitalizations by accounting for delays between infection and hospitalization
@@ -80,7 +80,9 @@ We'll use `{epiparameter}` to define these delay distributions. The Gamma distri
8080
- It's bounded at zero (negative delays don't make sense)
8181
- It's supported by empirical data for many infectious diseases
8282

83-
```{r, echo = FALSE, message = FALSE}
83+
:::::::::::::::: instructor
84+
85+
```{r, echo = TRUE, message = FALSE}
8486
# load contact and population data from socialmixr::polymod
8587
polymod <- socialmixr::polymod
8688
contact_data <- socialmixr::contact_matrix(
@@ -134,7 +136,7 @@ recovery_rate <- 1.0 / infectious_period
134136
transmission_rate <- basic_reproduction / infectious_period
135137
136138
# run an epidemic model using `epidemic()`
137-
output_plot <- epidemics::model_default(
139+
output <- epidemics::model_default(
138140
population = uk_population,
139141
transmission_rate = transmission_rate,
140142
infectiousness_rate = infectiousness_rate,
@@ -144,8 +146,10 @@ output_plot <- epidemics::model_default(
144146
145147
```
146148

149+
::::::::::::::::
150+
147151
```{r}
148-
new_cases <- new_infections(output_plot, by_group = FALSE)
152+
new_cases <- new_infections(output, by_group = FALSE)
149153
head(new_cases)
150154
```
151155

0 commit comments

Comments
 (0)