Skip to content

Commit

Permalink
Subsetting parameter table directly to include only serial intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
CarmenTamayo authored and joshwlambert committed Oct 7, 2024
1 parent 10fed1b commit d290c39
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions vignettes/articles/data_from_epireview.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,16 @@ For this example we will load the Ebola epidemiological parameters from the {epi
ebola_data <- load_epidata("ebola")
```

We will again subset the data to just use the epidemiological parameter table, and subset that table to just the delay distributions.
We will again subset the data to just use the epidemiological parameter table, and select those rows containing a serial interval.

```{r, ebola-params}
ebola_params <- ebola_data$params
```

```{r, subset-ebola-params}
delay_dist_rows <- grepl(
pattern = "Human delay",
x = ebola_params$parameter_type,
fixed = TRUE
)
ebola_delays <- ebola_params[delay_dist_rows, ]
ebola_delays
ebola_si_rows <- ebola_params[
ebola_params$parameter_type_short=="serial_interval",]
ebola_si_rows
```

We will select the 358th entry, which is a serial interval, as this entry has estimated and reported a Weibull distribution:
Expand Down

0 comments on commit d290c39

Please sign in to comment.