#' \code{inputs} is a list of the original input variables \code{NT, mu}.\r
#'\r
#' @examples\r
-#'\r
#' ## ===================================================== ##\r
#' ## Illustrate on weekly data ##\r
#' ## ===================================================== ##\r
#'\r
#' NT <- c(1, 4, 10, 5, 3, 4, 19, 3, 3, 14, 4)\r
#' ## obtain Rhat when serial distribution has mean of five days\r
-#' res1 <- IDEA(NT=NT, mu=5/7)\r
-#' res1$Rhat\r
+#' IDEA(NT=NT, mu=5/7)\r
#' ## obtain Rhat when serial distribution has mean of three days\r
-#' res2 <- IDEA(NT=NT, mu=3/7)\r
-#' res2$Rhat\r
+#' IDEA(NT=NT, mu=3/7)\r
#'\r
#' ## ========================================================= ##\r
#' ## Compute Rhat using only the first five weeks of data ##\r
#' ## ========================================================= ##\r
#'\r
-#'\r
-#' res3 <- IDEA(NT=NT[1:5], mu=5/7) # serial distribution has mean of five days\r
-#' res3$Rhat\r
+#' IDEA(NT=NT[1:5], mu=5/7) # serial distribution has mean of five days\r
#'\r
#' @export\r
IDEA <- function(NT, mu) {\r
IDEA2 <- TT * sum(y2) - sum(s)^2\r
IDEA <- exp(IDEA1 / IDEA2)\r
\r
- return(list(Rhat=IDEA, inputs=list(NT=NT, mu=mu)))\r
+ return(IDEA)\r
}\r
}\r