]> nmode's Git Repositories - Rnaught/blobdiff - R/WP_known.R
Create shiny UI
[Rnaught] / R / WP_known.R
index 6b0e2eaaf08dfae932cc9a074d3ea33a51bd3247..4c43ed2dc1eb76ec3b72031ff22a77c0587d0415 100644 (file)
@@ -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.
 #'
 #' 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
 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)
     }
 
     Rhat <- sum(NT[-1]) / sum(mu_t)
-       return(list(Rhat=Rhat))
+       return(Rhat)
 }
 }