Skip to content

Commit 062acdc

Browse files
authored
update proportion transmission argument name
1 parent b33f857 commit 062acdc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

episodes/superspreading-estimate.Rmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -589,12 +589,12 @@ across_offspring <- epidist_string %>%
589589
# unnest parameters
590590
unnest_wider(col = epidist_params) %>%
591591
# 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)) %>%
593593
# estimate proportion of cases responsible of proportion of transmission (row)
594594
mutate(
595595
transmission_output =
596596
pmap(
597-
.l = dplyr::select(., R = mean, k = dispersion, percent_transmission),
597+
.l = dplyr::select(., R = mean, k = dispersion, prop_transmission),
598598
.f = superspreading::proportion_transmission,
599599
format_prop = FALSE,
600600
simulate = TRUE # use a numerical simulation
@@ -617,8 +617,8 @@ across_offspring <- epidist_string %>%
617617
# get a position to the ggplot text annotation
618618
across_offspring_tip <- across_offspring %>%
619619
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) %>%
622622
ungroup() %>%
623623
mutate(disease = case_when(
624624
str_detect(disease, stringr::fixed("Hantavirus")) ~ "Hantavirus",
@@ -632,7 +632,7 @@ across_offspring %>%
632632
geom_line(
633633
aes(
634634
x = percent_cases,
635-
y = percent_transmission,
635+
y = prop_transmission,
636636
color = dispersion,
637637
group = disease
638638
)
@@ -641,7 +641,7 @@ across_offspring %>%
641641
data = across_offspring_tip,
642642
aes(
643643
x = percent_cases,
644-
y = percent_transmission,
644+
y = prop_transmission,
645645
label = disease
646646
),
647647
hjust = 0.0,
@@ -859,7 +859,7 @@ ebola_params
859859
superspreading::proportion_transmission(
860860
R = ebola_params[["mean"]],
861861
k = ebola_params[["dispersion"]],
862-
percent_transmission = 0.8
862+
prop_transmission = 0.8
863863
)
864864
865865
#' estimate for sars --------------
@@ -870,7 +870,7 @@ superspreading::proportion_transmission(
870870
superspreading::proportion_transmission(
871871
R = sars_params[["mean"]],
872872
k = sars_params[["dispersion"]],
873-
percent_transmission = 0.8
873+
prop_transmission = 0.8
874874
)
875875
876876
@@ -882,7 +882,7 @@ superspreading::proportion_transmission(
882882
superspreading::proportion_transmission(
883883
R = offspring_fit$estimate["mu"],
884884
k = offspring_fit$estimate["size"],
885-
percent_transmission = 0.8
885+
prop_transmission = 0.8
886886
)
887887
```
888888

0 commit comments

Comments
 (0)