From 177148c9d2cc321af86d16ec0a360f2aeedf7d9b Mon Sep 17 00:00:00 2001 From: hannajankowski Date: Thu, 28 Jul 2022 12:04:17 -0400 Subject: Update WP.R --- R/WP.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'R') diff --git a/R/WP.R b/R/WP.R index f2eb536..edaf629 100644 --- a/R/WP.R +++ b/R/WP.R @@ -2,11 +2,11 @@ #' #' This function implements an R0 estimation due to White and Pagano (Statistics in Medicine, 2008). The method is based on maximum likelihood estimation in a Poisson transmission model. See details for important implementation notes. #' -#' This method is based on a Poisson transmission model, which may be most most valid at the beginning of an epidemic. It was developed in White and Pagano (2008). In their model, the serial distribution is assumed to be discrete with a finite number of posible values. In this implementation, if the serial distribution is assumed known, it is taken to be a discretized version of a gamma distribution with mean \code{mu}, shape parameter one, and largest possible value based on parameter \code{tol}. When the serial distribution is unknown, the function implements a grid search algorithm to find the maximum likelihood estimator over all possible gamma distributions with unknown mean and variance, restricting these to a prespecified grid (see \code{search} parameter). +#' This method is based on a Poisson transmission model, and hence may be most most valid at the beginning of an epidemic. In their model, the serial distribution is assumed to be discrete with a finite number of posible values. In this implementation, if the serial distribution is assumed known, it is taken to be a discretized version of a gamma distribution with mean \code{mu}, shape parameter one, and largest possible value based on parameter \code{tol}. When the serial distribution is unknown, the function implements a grid search algorithm to find the maximum likelihood estimator over all possible gamma distributions with unknown mean and variance, restricting these to a prespecified grid (see \code{search} parameter). #' -#' When the serial distribution is taken to be \code{known}, sensitivity testing of the parameter \code{mu} is strongly recommended. If the serial distribution is \code{unknown}, the likelihood function can be flat near the maximum, resulting in numerical instability of the optimizer. Users should be careful about units of time (e.g. are counts observed daily or weekly?) when implementing. When the serial distribution is \code{unkown} the implementation takes considerably longer to run. +#' When the serial distribution is taken to be \code{known}, sensitivity testing of the parameter \code{mu} is strongly recommended. If the serial distribution is \code{unknown}, the likelihood function can be flat near the maximum, resulting in numerical instability of the optimizer. When the serial distribution is \code{unkown} the implementation takes considerably longer to run. Users should be careful about units of time (e.g. are counts observed daily or weekly?) when implementing. #' -#' The model developed in White and Pagano (2008) is discrete, and hence the serial distribution is finite discrete. Due to this implementation (inspired by that suggested in White and Pagano (2008)), the input value \code{mu} is that of a continuous distribution. The algorithm when \code{method="known"} disretizes this input, and hence the mean of the serial distribution returned in the list \code{SD} will differ from \code{mu} somewhat. +#' The model developed in White and Pagano (2008) is discrete, and hence the serial distribution is finite discrete. In our implementation, the input value \code{mu} is that of a continuous distribution. The algorithm when \code{method="known"} disretizes this input, and hence the mean of the serial distribution returned in the list \code{SD} will differ from \code{mu} somewhat. That is to say, if the user notices that the input \code{mu} and out put mean of \code{SD} are different, this is to be expected, and is caused by the discretization. #' #' #' @param NT Vector of case counts -- cgit v1.2.3