From 9d7b542a1eb1eead875ad7f939936e4d8ac83145 Mon Sep 17 00:00:00 2001 From: Naeem Model Date: Wed, 21 Jun 2023 06:17:43 +0000 Subject: Remove input args from output lists --- R/WP.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'R/WP.R') diff --git a/R/WP.R b/R/WP.R index 9e44bf9..8d528d5 100644 --- a/R/WP.R +++ b/R/WP.R @@ -68,14 +68,14 @@ #' res3 <- WP(NT=NT) #' res3$Rhat #' ## find mean of estimated serial distribution -#' serial <- res3$SD -#' sum(serial$supp*serial$pmf) +#' serial <- res3$SD +#' sum(serial$supp * serial$pmf) #' #' ## ========================================================= ## #' ## Compute Rhat using only the first five weeks of data ## #' ## ========================================================= ## #' -#' res4 <- WP(NT=NT[1:5], mu=5/7, method="known") # serial distribution has mean of five days +#' res4 <- WP(NT=NT[1:5], mu=5/7, method="known") # serial distribution has mean of five days #' res4$Rhat #' #' @export @@ -99,10 +99,10 @@ WP <- function(NT, mu="NA", method="unknown", search=list(B=100, shape.max=10, s p <- diff(pexp(0:range.max, 1/mu)) p <- p / sum(p) res <- WP_known(NT=NT, p=p) - Rhat <- res$Rhat + Rhat <- res JJ <- NA } } - return(list(Rhat=Rhat, check=length(JJ), SD=list(supp=1:range.max, pmf=p), inputs=list(NT=NT, mu=mu, method=method, search=search, tol=tol))) + return(list(Rhat=Rhat, check=length(JJ), SD=list(supp=1:range.max, pmf=p))) } -- cgit v1.2.3