X-Git-Url: https://git.nmode.ca/Rnaught/blobdiff_plain/9c1a5668803e735f034700c55028ffc0146f1e93..80624375941bebfd3629f3972555e5a63ba66ec1:/R/WP_known.R?ds=inline diff --git a/R/WP_known.R b/R/WP_known.R index 6b0e2ea..4c43ed2 100644 --- a/R/WP_known.R +++ b/R/WP_known.R @@ -3,11 +3,12 @@ #' This is a background/internal function called by \code{WP}. It computes the maximum #' likelihood estimator of R0 assuming that the serial distribution is known and finite discrete. #' -#' @param NT vector of case counts -#' @param p discretized version of the serial distribution -#' @return The function returns \code{Rhat}, the maximum likelihood estimator of R0. +#' @param NT Vector of case counts. +#' @param p Discretized version of the serial distribution. #' -#' @export +#' @return The function returns the maximum likelihood estimator of R0. +#' +#' @keywords internal WP_known <- function(NT, p) { k <- length(p) TT <- length(NT) - 1 @@ -19,5 +20,5 @@ WP_known <- function(NT, p) { } Rhat <- sum(NT[-1]) / sum(mu_t) - return(list(Rhat=Rhat)) + return(Rhat) }