@@ -589,12 +589,12 @@ across_offspring <- epidist_string %>%
589
589
# unnest parameters
590
590
unnest_wider(col = epidist_params) %>%
591
591
# to each disease, add sequence from 0.01 to 1 (proportion of transmission)
592
- expand_grid(percent_transmission = seq(from = 0.01, to = 1, by = 0.01)) %>%
592
+ expand_grid(prop_transmission = seq(from = 0.01, to = 1, by = 0.01)) %>%
593
593
# estimate proportion of cases responsible of proportion of transmission (row)
594
594
mutate(
595
595
transmission_output =
596
596
pmap(
597
- .l = dplyr::select(., R = mean, k = dispersion, percent_transmission ),
597
+ .l = dplyr::select(., R = mean, k = dispersion, prop_transmission ),
598
598
.f = superspreading::proportion_transmission,
599
599
format_prop = FALSE,
600
600
simulate = TRUE # use a numerical simulation
@@ -617,8 +617,8 @@ across_offspring <- epidist_string %>%
617
617
# get a position to the ggplot text annotation
618
618
across_offspring_tip <- across_offspring %>%
619
619
group_by(disease) %>%
620
- filter(percent_transmission < 0.98, percent_transmission > 0.85) %>%
621
- slice_max(percent_transmission ) %>%
620
+ filter(prop_transmission < 0.98, prop_transmission > 0.85) %>%
621
+ slice_max(prop_transmission ) %>%
622
622
ungroup() %>%
623
623
mutate(disease = case_when(
624
624
str_detect(disease, stringr::fixed("Hantavirus")) ~ "Hantavirus",
@@ -632,7 +632,7 @@ across_offspring %>%
632
632
geom_line(
633
633
aes(
634
634
x = percent_cases,
635
- y = percent_transmission ,
635
+ y = prop_transmission ,
636
636
color = dispersion,
637
637
group = disease
638
638
)
@@ -641,7 +641,7 @@ across_offspring %>%
641
641
data = across_offspring_tip,
642
642
aes(
643
643
x = percent_cases,
644
- y = percent_transmission ,
644
+ y = prop_transmission ,
645
645
label = disease
646
646
),
647
647
hjust = 0.0,
@@ -859,7 +859,7 @@ ebola_params
859
859
superspreading::proportion_transmission(
860
860
R = ebola_params[["mean"]],
861
861
k = ebola_params[["dispersion"]],
862
- percent_transmission = 0.8
862
+ prop_transmission = 0.8
863
863
)
864
864
865
865
#' estimate for sars --------------
@@ -870,7 +870,7 @@ superspreading::proportion_transmission(
870
870
superspreading::proportion_transmission(
871
871
R = sars_params[["mean"]],
872
872
k = sars_params[["dispersion"]],
873
- percent_transmission = 0.8
873
+ prop_transmission = 0.8
874
874
)
875
875
876
876
@@ -882,7 +882,7 @@ superspreading::proportion_transmission(
882
882
superspreading::proportion_transmission(
883
883
R = offspring_fit$estimate["mu"],
884
884
k = offspring_fit$estimate["size"],
885
- percent_transmission = 0.8
885
+ prop_transmission = 0.8
886
886
)
887
887
```
888
888
0 commit comments