From 1ccf18e931553d4ae97e35bc16c42c35132bab3e Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 27 Sep 2024 17:37:20 +0100 Subject: [PATCH] Add some text to give more context to proportion_transmission calls in proportion_transmission vignette --- vignettes/proportion_transmission.Rmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vignettes/proportion_transmission.Rmd b/vignettes/proportion_transmission.Rmd index 65c62f9..173829c 100644 --- a/vignettes/proportion_transmission.Rmd +++ b/vignettes/proportion_transmission.Rmd @@ -317,6 +317,8 @@ proportion_transmission( One thing that was mentioned above is that the interpretation of the $p_{80}$ and $t_{20}$ methods are not interchangeable, additionally, $t_{80}$ and $p_{20}$ are not equal. Stated differently, the $p_{80}$ method to calculate the proportion of transmission that cause 20% of cases, and the $t_{20}$ method to calculate the proportion of transmission caused by the most infectious 80% are not equivalent. It is also the case that $1 - p_{80} \neq t_{20}$, thus $1 - t_{20} \neq p_{80}$. +Here we vary $R$ and $k$ and show that by setting the $p_{80}$ method to `percent_transmission = 0.2`, and the $t_{20}$ method to `percent_transmission = 0.8` the two cannot be interchangeably interpreted as outlined in the box above. + ```{r} # R = 1, k = 0.5 proportion_transmission( @@ -335,6 +337,8 @@ proportion_transmission( ) ``` +Here we show that $1 - p_{80} \neq t_{20}$ and $1 - t_{20} \neq p_{80}$. + ```{r} 1 - proportion_transmission( R = 1, k = 0.5, percent_transmission = 0.8, method = "p_80",