aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/WP.R4
-rw-r--r--R/WP_internal.R8
-rw-r--r--R/seqB.R4
3 files changed, 8 insertions, 8 deletions
diff --git a/R/WP.R b/R/WP.R
index a6e5354..5440e35 100644
--- a/R/WP.R
+++ b/R/WP.R
@@ -43,8 +43,8 @@
#' \code{scale.max}, which is the largest possible value of the
#' scale parameter; and the third is \code{shape.max}, which is
#' the largest possible value of the shape parameter. Defaults to
-#' \code{B=100, scale.max=10, shape.max=10}. For both shape and
-#' scale, the smallest possible value is 1/\code{B}.
+#' \code{B = 100, scale.max = 10, shape.max = 10}. For both shape
+#' and scale, the smallest possible value is 1/\code{B}.
#' @param tol Cutoff value for cumulative distribution function of the
#' pre-discretization gamma serial distribution. Defaults to 0.999
#' (i.e. in the discretization, the maximum is chosen such that the
diff --git a/R/WP_internal.R b/R/WP_internal.R
index 420d0c0..dd10d29 100644
--- a/R/WP_internal.R
+++ b/R/WP_internal.R
@@ -9,7 +9,7 @@
#'
#' @return The function returns the maximum likelihood estimator of R0.
#'
-#' @keywords internal
+#' @noRd
WP_known <- function(NT, p) {
k <- length(p)
TT <- length(NT) - 1
@@ -54,7 +54,7 @@ WP_known <- function(NT, p) {
#'
#' @importFrom stats pgamma qgamma
#'
-#' @keywords internal
+#' @noRd
WP_unknown <- function(NT, B = 100, shape.max = 10, scale.max = 10,
tol = 0.999) {
shape <- seq(0, shape.max, length.out = B + 1)
@@ -91,14 +91,14 @@ WP_unknown <- function(NT, B = 100, shape.max = 10, scale.max = 10,
#' This is a background/internal function called by \code{WP}. It computes the
#' log-likelihood.
#'
-#' @param NT Vector of case counts.
#' @param p Discretized version of the serial distribution.
+#' @param NT Vector of case counts.
#' @param R0 Basic reproductive ratio.
#'
#' @return This function returns the log-likelihood at the input variables and
#' parameters.
#'
-#' @keywords internal
+#' @noRd
computeLL <- function(p, NT, R0) {
k <- length(p)
TT <- length(NT) - 1
diff --git a/R/seqB.R b/R/seqB.R
index e51117f..09efe07 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