Skip to content

Commit

Permalink
Update Readme.Rmd with <epidemic> class
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikunterwegs committed Jan 31, 2024
1 parent d4706cb commit 0a24884
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,20 @@ output <- model_default_cpp(
)
```

_epidemics_ models return output of the `<epidemic>` class, which encapsulates the model function name, model data (under "data"), and model parameters (such as infection parameters) and composable elements (such as interventions) under "parameters", as well as the package version used to run the model (under "hash").

```{r}
# visualise the <epidemic> object
output
# get data from model run
data <- get_parameter(output, "data")
```

Visualise the development of individuals in the "infectious" compartment over model time. Note that these curves represent the number of individuals that are infectious, and not the number of newly infectious individuals.

```{r fig-modelout, echo=FALSE}
filter(output, compartment == "infectious") %>%
filter(data, compartment == "infectious") %>%
ggplot() +
geom_vline(
xintercept = c(close_schools[["time_begin"]], close_schools[["time_end"]]),
Expand Down

0 comments on commit 0a24884

Please sign in to comment.