X-Git-Url: https://git.nmode.ca/Rnaught/blobdiff_plain/80df3ed7a280f86a3b9b5443309487d428f4fe95..e1c61de5a0e693e2f24a1c4a10336e2a1c4563cb:/R/seqB.R?ds=sidebyside diff --git a/R/seqB.R b/R/seqB.R index e51117f..1dcf927 100644 --- a/R/seqB.R +++ b/R/seqB.R @@ -11,7 +11,7 @@ #' posterior distribution. The prior distribution is the initial belief of the #' distribution of R0, which is the uninformative uniform distribution with #' values between zero and \code{kappa}. Users can change the value of -#' /code{kappa} only (i.e., the prior distribution cannot be changed from the +#' \code{kappa} only (i.e., the prior distribution cannot be changed from the #' uniform). As more case counts are observed, the influence of the prior #' distribution should lessen on the final estimate \code{Rhat}. #' @@ -41,7 +41,7 @@ #' \code{Rhat} is the estimate of R0 (the posterior mean), #' \code{posterior} is the posterior distribution of R0 from which #' alternate estimates can be obtained (see examples), and \code{group} -#' is an indicator variable (if \code{group=TRUE}, zero values of NT +#' is an indicator variable (if \code{group == TRUE}, zero values of NT #' were input and grouping was done to obtain \code{Rhat}). The variable #' \code{posterior} is returned as a list made up of \code{supp} (the #' support of the distribution) and \code{pmf} (the probability mass @@ -78,9 +78,9 @@ #' #' @export seqB <- function(NT, mu, kappa = 20) { - if (length(NT) < 2) { + if (length(NT) < 2) print("Warning: length of NT should be at least two.") - } else { + else { if (min(NT) > 0) { times <- 1:length(NT) tau <- diff(times)