Skip to content

Commit 77d2f64

Browse files
oops
1 parent 611fafe commit 77d2f64

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

exploration-exercises.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ column. Let’s focus on those. We can use this SIR example.
1717
library(macpan2); library(tidyverse)
1818
```
1919

20-
## ── Attaching core tidyverse packages ────────────────────────────────────────────── tidyverse 2.0.0 ──
20+
## ── Attaching core tidyverse packages ─────────────────────── tidyverse 2.0.0 ──
2121
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
2222
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
2323
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
2424
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
2525
## ✔ purrr 1.0.2
26-
## ── Conflicts ──────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
26+
## ── Conflicts ───────────────────────────────────────── tidyverse_conflicts() ──
2727
## ✖ dplyr::all_equal() masks macpan2::all_equal()
2828
## ✖ dplyr::filter() masks stats::filter()
2929
## ✖ dplyr::lag() masks stats::lag()
@@ -183,7 +183,7 @@ simulated_sir = read_csv("https://raw.githubusercontent.com/canmod/macpan-worksh
183183
```
184184

185185
## Rows: 100 Columns: 3
186-
## ── Column specification ──────────────────────────────────────────────────────────────────────────────
186+
## ── Column specification ───────────────────────────────────────────────────────
187187
## Delimiter: ","
188188
## chr (1): matrix
189189
## dbl (2): time, value
@@ -212,7 +212,7 @@ early_on_covid_reports = read_csv("https://raw.githubusercontent.com/canmod/macp
212212
```
213213

214214
## Rows: 147 Columns: 4
215-
## ── Column specification ──────────────────────────────────────────────────────────────────────────────
215+
## ── Column specification ───────────────────────────────────────────────────────
216216
## Delimiter: ","
217217
## chr (2): province, var
218218
## dbl (1): value
@@ -268,22 +268,10 @@ Let’s keep it simple again and get more practice simulating and fitting.
268268
You can use this calibrated model to practice making forecasts and
269269
exploring scenarios.
270270

271-
``` r
272-
exercise(
273-
"Simulate 50 time steps of incidence (i.e., the infection flow) from the SIR model in the library with defaults. Create a calibrator but change the default values of `beta` and `gamma` so that the optimizer will need to do work to find the true values. Then calibrate your model to the simulation data using [mp_optimize](https://canmod.github.io/macpan2/reference/mp_optimize.html). After optimizing use [mp_forecaster](https://canmod.github.io/macpan2/reference/mp_forecaster) to extend 50 more time steps, so that the entire simulation would be 100 time steps. Use [mp_trajectory_sd](https://canmod.github.io/macpan2/reference/mp_trajectory.html) to produce forecasts with confidence intervals."
274-
)
275-
```
276-
277271
| <img src="images/exercise.svg" width="120" /> |
278272
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
279273
| Simulate 50 time steps of incidence (i.e., the infection flow) from the SIR model in the library with defaults. Create a calibrator but change the default values of `beta` and `gamma` so that the optimizer will need to do work to find the true values. Then calibrate your model to the simulation data using [mp_optimize](https://canmod.github.io/macpan2/reference/mp_optimize.html). After optimizing use [mp_forecaster](https://canmod.github.io/macpan2/reference/mp_forecaster) to extend 50 more time steps, so that the entire simulation would be 100 time steps. Use [mp_trajectory_sd](https://canmod.github.io/macpan2/reference/mp_trajectory.html) to produce forecasts with confidence intervals. |
280274

281-
``` r
282-
exercise(
283-
"Create a scenario for beta, where transmission increases by a factor of 1.2 at time 60 (10 time steps after the data end). The answers for this exercise are [here](https://github.com/canmod/macpan-workshop/blob/main/code/simple-scenario.R)."
284-
)
285-
```
286-
287275
| <img src="images/exercise.svg" width="120" /> |
288276
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
289277
| Create a scenario for beta, where transmission increases by a factor of 1.2 at time 60 (10 time steps after the data end). The answers for this exercise are [here](https://github.com/canmod/macpan-workshop/blob/main/code/simple-scenario.R). |

0 commit comments

Comments
 (0)