diff options
author | hannajankowski <hkj@yorku.ca> | 2022-07-28 12:04:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 12:04:17 -0400 |
commit | 177148c9d2cc321af86d16ec0a360f2aeedf7d9b (patch) | |
tree | 8c9dfb809497d12a9bccb6b7ff5558709d595c1e /R | |
parent | 520116092ceca1a831fdc716eb20e8356303dec0 (diff) |
Update WP.R
Diffstat (limited to 'R')
-rw-r--r-- | R/WP.R | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |