diff options
author | Naeem Model <me@nmode.ca> | 2023-06-21 06:17:43 +0000 |
---|---|---|
committer | Naeem Model <me@nmode.ca> | 2023-06-21 06:17:43 +0000 |
commit | 9d7b542a1eb1eead875ad7f939936e4d8ac83145 (patch) | |
tree | 0412b0f36951698aadaa82ef632035397aafdc89 /R/WP.R | |
parent | 9c1a5668803e735f034700c55028ffc0146f1e93 (diff) |
Remove input args from output lists
Diffstat (limited to 'R/WP.R')
-rw-r--r-- | R/WP.R | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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))) } |