Skip to content

Commit

Permalink
Update fitting_synthetic_data_using_epidp.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
ben18785 committed Aug 12, 2024
1 parent 739d54e commit c04cfa4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vignettes/fitting_synthetic_data_using_epidp.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,20 @@ i_0 <- 10
epidemic_df <- simulate_renewal_epidemic(rt_fun, nt, mean_si, sd_si, i_0)
# plot
transform_factor <- 150
epidemic_df %>%
select(-c(w_dist, lambda_t)) %>%
mutate(R_t = R_t * transform_factor) %>%
pivot_longer(c(i_t, R_t)) %>%
ggplot(aes(x = t, y = value, colour = name)) +
geom_line() +
scale_y_continuous(
name = "Incidence (i_t)",
sec.axis = sec_axis(~ . / 1000, name = "Reproduction Number (R_t)")
sec.axis = sec_axis(~ . / transform_factor, name = "Reproduction Number (R_t)")
) +
labs(x = "Time", colour = "Variable") +
theme_minimal()
labs(x = "Time") +
theme_minimal() +
scale_color_brewer("Series", palette = "Dark2")
```

We now use a Stan version of EpiFilter to estimate the $R_t$ profile.
Expand Down

0 comments on commit c04cfa4

Please sign in to comment.