]> nmode's Git Repositories - Rnaught/commitdiff
Update documentation
authorNaeem Model <me@nmode.ca>
Tue, 13 Feb 2024 08:22:47 +0000 (08:22 +0000)
committerNaeem Model <me@nmode.ca>
Tue, 13 Feb 2024 08:22:47 +0000 (08:22 +0000)
R/id.R
R/idea.R
R/seq_bayes.R
R/wp.R
man/wp.Rd

diff --git a/R/id.R b/R/id.R
index eef66d68a25c9ed1ef5f50092d5709ec51431bfa..91fa5cab727b43681cb14713333389640a5a1f7e 100644 (file)
--- a/R/id.R
+++ b/R/id.R
@@ -24,8 +24,7 @@
 #'
 #' @return An estimate of the basic reproduction number (R0).
 #'
 #'
 #' @return An estimate of the basic reproduction number (R0).
 #'
-#' @references
-#' [Fisman et al. (PloS One, 2013)](
+#' @references [Fisman et al. (PloS One, 2013)](
 #' https://doi.org/10.1371/journal.pone.0083622)
 #'
 #' @seealso [idea()] for a similar method.
 #' https://doi.org/10.1371/journal.pone.0083622)
 #'
 #' @seealso [idea()] for a similar method.
index 054952729ac9d35026203581905d3d9b681fc9f7..53ba98aa5f9181781765ae8edaceba17badee366 100644 (file)
--- a/R/idea.R
+++ b/R/idea.R
@@ -25,8 +25,7 @@
 #'
 #' @return An estimate of the basic reproduction number (R0).
 #'
 #'
 #' @return An estimate of the basic reproduction number (R0).
 #'
-#' @references
-#' [Fisman et al. (PloS One, 2013)](
+#' @references [Fisman et al. (PloS One, 2013)](
 #' https://doi.org/10.1371/journal.pone.0083622)
 #'
 #' @seealso [id()] for a similar method.
 #' https://doi.org/10.1371/journal.pone.0083622)
 #'
 #' @seealso [id()] for a similar method.
index 59b7b4b0a107f1bec314ea3fa63b69cbc235632a..428441939686e43a723eda6ceeb7766e0a5b069d 100644 (file)
@@ -51,8 +51,7 @@
 #'   returned. Note that the estimate is equal to `sum(supp * pmf)` (i.e., the
 #'   posterior mean).
 #'
 #'   returned. Note that the estimate is equal to `sum(supp * pmf)` (i.e., the
 #'   posterior mean).
 #'
-#' @references
-#' [Bettencourt and Riberio (PloS One, 2008)](
+#' @references [Bettencourt and Riberio (PloS One, 2008)](
 #' https://doi.org/10.1371/journal.pone.0002185)
 #'
 #' @seealso `vignette("seq_bayes_post", package = "Rnaught")` for examples of
 #' https://doi.org/10.1371/journal.pone.0002185)
 #'
 #' @seealso `vignette("seq_bayes_post", package = "Rnaught")` for examples of
diff --git a/R/wp.R b/R/wp.R
index 3448911de0cfa33d0cd693b16131cca7fe449500..428f3667f80edd892b44f84d995383d48c345829 100644 (file)
--- a/R/wp.R
+++ b/R/wp.R
 #'
 #' @param cases Vector of case counts. The vector must be of length at least two
 #'   and only contain positive integers.
 #'
 #' @param cases Vector of case counts. The vector must be of length at least two
 #'   and only contain positive integers.
-#' @param mu Mean of the serial distribution. This must be a positive number or
-#'   `NA`. If a number is specified, the value should match the case counts in
-#'   time units. For example, if case counts are weekly and the serial
-#'   distribution has a mean of seven days, then `mu` should be set to `1`. If
-#'   case counts are daily and the serial distribution has a mean of seven days,
-#'   then `mu` should be set to `7`.
+#' @param mu Mean of the serial distribution (defaults to `NA`). This must be a
+#'   positive number or `NA`. If a number is specified, the value should match
+#'   the case counts in time units. For example, if case counts are weekly and
+#'   the serial distribution has a mean of seven days, then `mu` should be set
+#'   to `1`. If case counts are daily and the serial distribution has a mean of
+#'   seven days, then `mu` should be set to `7`.
 #' @param serial Whether to return the estimated serial distribution in addition
 #' @param serial Whether to return the estimated serial distribution in addition
-#'   to the estimate of R0. This must be a value identical to `TRUE` or `FALSE`.
+#'   to the estimate of R0 (defaults to `FALSE`). This must be a value identical
+#'   to `TRUE` or `FALSE`.
 #' @param grid_length The length of the grid in the grid search (defaults to
 #'   100). This must be a positive integer. It will only be used if `mu` is set
 #'   to `NA`. The grid search will go through all combinations of the shape and
 #' @param grid_length The length of the grid in the grid search (defaults to
 #'   100). This must be a positive integer. It will only be used if `mu` is set
 #'   to `NA`. The grid search will go through all combinations of the shape and
@@ -71,8 +72,7 @@
 #'   Otherwise, if `serial` is identical to `FALSE`, only the estimate of R0 is
 #'   returned.
 #'
 #'   Otherwise, if `serial` is identical to `FALSE`, only the estimate of R0 is
 #'   returned.
 #'
-#' @references
-#' [White and Pagano (Statistics in Medicine, 2008)](
+#' @references [White and Pagano (Statistics in Medicine, 2008)](
 #' https://doi.org/10.1002/sim.3136)
 #'
 #' @seealso `vignette("wp_serial", package="Rnaught")` for examples of using the
 #' https://doi.org/10.1002/sim.3136)
 #'
 #' @seealso `vignette("wp_serial", package="Rnaught")` for examples of using the
index 450c948a857ec3abc268fc794b1e2c1dab987cc2..7e4cc42f8d389bb500e7cd1d15eee915cc6e3150 100644 (file)
--- a/man/wp.Rd
+++ b/man/wp.Rd
@@ -17,15 +17,16 @@ wp(
 \item{cases}{Vector of case counts. The vector must be of length at least two
 and only contain positive integers.}
 
 \item{cases}{Vector of case counts. The vector must be of length at least two
 and only contain positive integers.}
 
-\item{mu}{Mean of the serial distribution. This must be a positive number or
-\code{NA}. If a number is specified, the value should match the case counts in
-time units. For example, if case counts are weekly and the serial
-distribution has a mean of seven days, then \code{mu} should be set to \code{1}. If
-case counts are daily and the serial distribution has a mean of seven days,
-then \code{mu} should be set to \code{7}.}
+\item{mu}{Mean of the serial distribution (defaults to \code{NA}). This must be a
+positive number or \code{NA}. If a number is specified, the value should match
+the case counts in time units. For example, if case counts are weekly and
+the serial distribution has a mean of seven days, then \code{mu} should be set
+to \code{1}. If case counts are daily and the serial distribution has a mean of
+seven days, then \code{mu} should be set to \code{7}.}
 
 \item{serial}{Whether to return the estimated serial distribution in addition
 
 \item{serial}{Whether to return the estimated serial distribution in addition
-to the estimate of R0. This must be a value identical to \code{TRUE} or \code{FALSE}.}
+to the estimate of R0 (defaults to \code{FALSE}). This must be a value identical
+to \code{TRUE} or \code{FALSE}.}
 
 \item{grid_length}{The length of the grid in the grid search (defaults to
 100). This must be a positive integer. It will only be used if \code{mu} is set
 
 \item{grid_length}{The length of the grid in the grid search (defaults to
 100). This must be a positive integer. It will only be used if \code{mu} is set
@@ -126,3 +127,7 @@ estimate$pmf
 \references{
 \href{https://doi.org/10.1002/sim.3136}{White and Pagano (Statistics in Medicine, 2008)}
 }
 \references{
 \href{https://doi.org/10.1002/sim.3136}{White and Pagano (Statistics in Medicine, 2008)}
 }
+\seealso{
+\code{vignette("wp_serial", package="Rnaught")} for examples of using the
+serial distribution.
+}