diff --git a/DESCRIPTION b/DESCRIPTION index 7ae815ca..36bfcb4d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,7 +34,6 @@ URL: https://mc-stan.org/cmdstanr/, https://discourse.mc-stan.org BugReports: https://github.com/stan-dev/cmdstanr/issues Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.3 Roxygen: list(markdown = TRUE, r6 = FALSE) SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan) Depends: @@ -60,3 +59,4 @@ Suggests: Rcpp VignetteBuilder: knitr Config/testthat/edition: 3 +Config/roxygen2/version: 8.0.0 diff --git a/man/CmdStanDiagnose.Rd b/man/CmdStanDiagnose.Rd index 8c786e88..5730e1df 100644 --- a/man/CmdStanDiagnose.Rd +++ b/man/CmdStanDiagnose.Rd @@ -40,7 +40,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanGQ}}, \code{\link{CmdStanLaplace}}, \code{\link{CmdStanMCMC}}, diff --git a/man/CmdStanGQ.Rd b/man/CmdStanGQ.Rd index 73fab133..5ec0cb4d 100644 --- a/man/CmdStanGQ.Rd +++ b/man/CmdStanGQ.Rd @@ -101,7 +101,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanLaplace}}, \code{\link{CmdStanMCMC}}, diff --git a/man/CmdStanLaplace.Rd b/man/CmdStanLaplace.Rd index 4d16723e..8861c627 100644 --- a/man/CmdStanLaplace.Rd +++ b/man/CmdStanLaplace.Rd @@ -62,7 +62,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanGQ}}, \code{\link{CmdStanMCMC}}, diff --git a/man/CmdStanMCMC.Rd b/man/CmdStanMCMC.Rd index 2148b7a6..3e3365af 100644 --- a/man/CmdStanMCMC.Rd +++ b/man/CmdStanMCMC.Rd @@ -33,7 +33,7 @@ methods, all of which have their own (linked) documentation pages. \code{\link[=fit-method-diagnostic_summary]{$diagnostic_summary()}} \tab Get summaries of sampler diagnostics and warning messages. \cr \code{\link[=fit-method-cmdstan_summary]{$cmdstan_summary()}} \tab Run and print CmdStan's \code{bin/stansummary}. \cr \code{\link[=fit-method-cmdstan_summary]{$cmdstan_diagnose()}} \tab Run and print CmdStan's \code{bin/diagnose}. \cr - \code{\link[=fit-method-loo]{$loo()}} \tab Run \code{\link[loo:loo]{loo::loo.array()}} for approximate LOO-CV \cr + \code{\link[=fit-method-loo]{$loo()}} \tab Run \code{\link[loo:loo.array]{loo::loo.array()}} for approximate LOO-CV \cr } } @@ -84,7 +84,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanGQ}}, \code{\link{CmdStanLaplace}}, diff --git a/man/CmdStanMLE.Rd b/man/CmdStanMLE.Rd index 0fbfedab..b8be8c7a 100644 --- a/man/CmdStanMLE.Rd +++ b/man/CmdStanMLE.Rd @@ -81,7 +81,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanGQ}}, \code{\link{CmdStanLaplace}}, diff --git a/man/CmdStanPathfinder.Rd b/man/CmdStanPathfinder.Rd index 970174dc..3ba607bd 100644 --- a/man/CmdStanPathfinder.Rd +++ b/man/CmdStanPathfinder.Rd @@ -62,7 +62,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanGQ}}, \code{\link{CmdStanLaplace}}, diff --git a/man/CmdStanVB.Rd b/man/CmdStanVB.Rd index 323ec339..accd866d 100644 --- a/man/CmdStanVB.Rd +++ b/man/CmdStanVB.Rd @@ -77,7 +77,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other fitted model objects: +Other fitted model objects: \code{\link{CmdStanDiagnose}}, \code{\link{CmdStanGQ}}, \code{\link{CmdStanLaplace}}, diff --git a/man/cmdstanr-package.Rd b/man/cmdstanr-package.Rd index be303bac..bd981c14 100644 --- a/man/cmdstanr-package.Rd +++ b/man/cmdstanr-package.Rd @@ -213,6 +213,7 @@ Useful links: Authors: \itemize{ + \item Jonah Gabry \email{jgabry@gmail.com} \item Rok Češnovar \email{rok.cesnovar@fri.uni-lj.si} \item Andrew Johnson \email{andrew.johnson@arjohnsonau.com} (\href{https://orcid.org/0000-0001-7000-8065}{ORCID}) \item Steve Bronder diff --git a/man/draws_to_csv.Rd b/man/draws_to_csv.Rd index f9ed7450..bfbf7b02 100644 --- a/man/draws_to_csv.Rd +++ b/man/draws_to_csv.Rd @@ -19,7 +19,7 @@ draws_to_csv( of sampler diagnostics.} \item{dir}{(string) An optional path to the directory where the CSV files will be -written. If not set, \link[base:tempfile]{temporary directory} is used.} +written. If not set, \link[base:tempdir]{temporary directory} is used.} \item{basename}{(string) If \code{dir} is specified, `basename`` is used for naming the output CSV files. If not specified, the file names are randomly generated.} diff --git a/man/fit-method-diagnostic_summary.Rd b/man/fit-method-diagnostic_summary.Rd index e6d1909a..18c3aba9 100644 --- a/man/fit-method-diagnostic_summary.Rd +++ b/man/fit-method-diagnostic_summary.Rd @@ -37,7 +37,7 @@ method. Currently parameter-specific diagnostics like R-hat and effective sample size are \emph{not} handled by this method. Those diagnostics are provided via the \code{\link[=fit-method-summary]{$summary()}} method (using -\code{\link[posterior:draws_summary]{posterior::summarize_draws()}}). +\code{\link[posterior:summarize_draws]{posterior::summarize_draws()}}). } \examples{ \dontrun{ diff --git a/man/fit-method-init_model_methods.Rd b/man/fit-method-init_model_methods.Rd index f21072b4..b9001181 100644 --- a/man/fit-method-init_model_methods.Rd +++ b/man/fit-method-init_model_methods.Rd @@ -20,7 +20,7 @@ The \verb{$init_model_methods()} method compiles and initializes the available as methods of the fitted model object. This requires the additional \pkg{Rcpp} package. -If a model or fit object was saved with \code{\link[base:readRDS]{base::saveRDS()}} and later +If a model or fit object was saved with \code{\link[base:saveRDS]{base::saveRDS()}} and later reloaded, any previously compiled model-method bindings will be rebuilt in the current R session when this method is called. diff --git a/man/fit-method-loo.Rd b/man/fit-method-loo.Rd index f9dcb7c9..2450645c 100644 --- a/man/fit-method-loo.Rd +++ b/man/fit-method-loo.Rd @@ -18,13 +18,13 @@ method.} is used to compute more accurate ESS and MCSE estimates for pointwise and total ELPDs. \itemize{ -\item \code{TRUE} will call \code{\link[loo:relative_eff]{loo::relative_eff.array()}} to compute the \code{r_eff} -argument to pass to \code{\link[loo:loo]{loo::loo.array()}}. +\item \code{TRUE} will call \code{\link[loo:relative_eff.array]{loo::relative_eff.array()}} to compute the \code{r_eff} +argument to pass to \code{\link[loo:loo.array]{loo::loo.array()}}. \item \code{FALSE} (the default) or \code{NULL} will avoid computing \code{r_eff}, which can be very slow. The reported ESS and MCSE estimates may be over-optimistic if the posterior draws are far from independent. \item If \code{r_eff} is anything else, that object will be passed as the \code{r_eff} -argument to \code{\link[loo:loo]{loo::loo.array()}}. +argument to \code{\link[loo:loo.array]{loo::loo.array()}}. }} \item{moment_match}{(logical) Whether to use a @@ -37,17 +37,17 @@ supply the functions for the \code{log_lik_i}, \code{unconstrain_pars}, \code{\link[loo:loo_moment_match]{loo::loo_moment_match()}}.} \item{...}{Other arguments (e.g., \code{cores}, \code{save_psis}, etc.) passed to -\code{\link[loo:loo]{loo::loo.array()}} or \code{\link[loo:loo_moment_match]{loo::loo_moment_match.default()}} +\code{\link[loo:loo.array]{loo::loo.array()}} or \code{\link[loo:loo_moment_match.default]{loo::loo_moment_match.default()}} (if \code{moment_match} = \code{TRUE} is set).} } \value{ -The object returned by \code{\link[loo:loo]{loo::loo.array()}} or -\code{\link[loo:loo_moment_match]{loo::loo_moment_match.default()}}. +The object returned by \code{\link[loo:loo.array]{loo::loo.array()}} or +\code{\link[loo:loo_moment_match.default]{loo::loo_moment_match.default()}}. } \description{ The \verb{$loo()} method computes approximate LOO-CV using the \pkg{loo} package. In order to use this method you must compute and save -the pointwise log-likelihood in your Stan program. See \code{\link[loo:loo]{loo::loo.array()}} +the pointwise log-likelihood in your Stan program. See \code{\link[loo:loo.array]{loo::loo.array()}} and the \pkg{loo} package \href{https://mc-stan.org/loo/articles/}{vignettes} for details. } diff --git a/man/fit-method-save_object.Rd b/man/fit-method-save_object.Rd index 12e46d6e..9ac343a0 100644 --- a/man/fit-method-save_object.Rd +++ b/man/fit-method-save_object.Rd @@ -14,11 +14,11 @@ save_object(file, format = c("rds", "qs2"), ...) \code{"rds"}. The \code{"qs2"} format uses \code{qs2::qs_save()} and requires the \strong{qs2} package.} -\item{...}{Other arguments to pass to \code{\link[base:readRDS]{base::saveRDS()}} (for \code{format = "rds"}) +\item{...}{Other arguments to pass to \code{\link[base:saveRDS]{base::saveRDS()}} (for \code{format = "rds"}) or \code{qs2::qs_save()} (for \code{format = "qs2"}).} } \description{ -This method is a wrapper around \code{\link[base:readRDS]{base::saveRDS()}} that ensures +This method is a wrapper around \code{\link[base:saveRDS]{base::saveRDS()}} that ensures that all posterior draws and diagnostics are saved when saving a fitted model object. Because the contents of the CmdStan output CSV files are only read into R lazily (i.e., as needed), the \verb{$save_object()} method is the diff --git a/man/model-method-check_syntax.Rd b/man/model-method-check_syntax.Rd index 5725defd..a15cee0f 100644 --- a/man/model-method-check_syntax.Rd +++ b/man/model-method-check_syntax.Rd @@ -77,7 +77,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, \code{\link{model-method-diagnose}}, diff --git a/man/model-method-cmdstan_defaults.Rd b/man/model-method-cmdstan_defaults.Rd index fa45b200..390727e1 100644 --- a/man/model-method-cmdstan_defaults.Rd +++ b/man/model-method-cmdstan_defaults.Rd @@ -47,7 +47,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-compile}}, \code{\link{model-method-diagnose}}, diff --git a/man/model-method-compile.Rd b/man/model-method-compile.Rd index 1dd12463..6c3c6132 100644 --- a/man/model-method-compile.Rd +++ b/man/model-method-compile.Rd @@ -144,7 +144,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-diagnose}}, diff --git a/man/model-method-diagnose.Rd b/man/model-method-diagnose.Rd index a9bb6a6a..7fdb4530 100644 --- a/man/model-method-diagnose.Rd +++ b/man/model-method-diagnose.Rd @@ -144,7 +144,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-expose_functions.Rd b/man/model-method-expose_functions.Rd index 92c105bb..9869e2cc 100644 --- a/man/model-method-expose_functions.Rd +++ b/man/model-method-expose_functions.Rd @@ -68,7 +68,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-format.Rd b/man/model-method-format.Rd index 9d28973e..80957dfc 100644 --- a/man/model-method-format.Rd +++ b/man/model-method-format.Rd @@ -84,7 +84,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-generate-quantities.Rd b/man/model-method-generate-quantities.Rd index e2131f63..aadc81f0 100644 --- a/man/model-method-generate-quantities.Rd +++ b/man/model-method-generate-quantities.Rd @@ -182,7 +182,7 @@ The Stan and CmdStan documentation: \item CmdStan User’s Guide: \href{https://mc-stan.org/docs/cmdstan-guide/}{mc-stan.org/docs/cmdstan-guide} } -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-laplace.Rd b/man/model-method-laplace.Rd index 6977e301..1076b192 100644 --- a/man/model-method-laplace.Rd +++ b/man/model-method-laplace.Rd @@ -236,7 +236,7 @@ https://mc-stan.org/docs/cmdstan-guide/ } } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-optimize.Rd b/man/model-method-optimize.Rd index 07f3c841..4b89318c 100644 --- a/man/model-method-optimize.Rd +++ b/man/model-method-optimize.Rd @@ -361,7 +361,7 @@ https://mc-stan.org/docs/cmdstan-guide/ } } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-pathfinder.Rd b/man/model-method-pathfinder.Rd index 58036c17..1f7f5fc3 100644 --- a/man/model-method-pathfinder.Rd +++ b/man/model-method-pathfinder.Rd @@ -380,7 +380,7 @@ https://mc-stan.org/docs/cmdstan-guide/ } } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-sample.Rd b/man/model-method-sample.Rd index f5285024..2dc6a855 100644 --- a/man/model-method-sample.Rd +++ b/man/model-method-sample.Rd @@ -446,7 +446,7 @@ https://mc-stan.org/docs/cmdstan-guide/ } } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-sample_mpi.Rd b/man/model-method-sample_mpi.Rd index b0cc6bc9..4302e54d 100644 --- a/man/model-method-sample_mpi.Rd +++ b/man/model-method-sample_mpi.Rd @@ -341,7 +341,7 @@ The Stan Math Library's documentation (\href{https://mc-stan.org/math/}{mc-stan.org/math}) for more details on MPI support in Stan. -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-variables.Rd b/man/model-method-variables.Rd index 1415fdc8..efacaf69 100644 --- a/man/model-method-variables.Rd +++ b/man/model-method-variables.Rd @@ -36,7 +36,7 @@ mod$variables() } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/model-method-variational.Rd b/man/model-method-variational.Rd index 684b152b..16219b5b 100644 --- a/man/model-method-variational.Rd +++ b/man/model-method-variational.Rd @@ -351,7 +351,7 @@ https://mc-stan.org/docs/cmdstan-guide/ } } \seealso{ -Other CmdStanModel methods: +Other CmdStanModel methods: \code{\link{model-method-check_syntax}}, \code{\link{model-method-cmdstan_defaults}}, \code{\link{model-method-compile}}, diff --git a/man/write_stan_file.Rd b/man/write_stan_file.Rd index 134b7172..5e7f754f 100644 --- a/man/write_stan_file.Rd +++ b/man/write_stan_file.Rd @@ -20,7 +20,7 @@ Stan program.} \item{dir}{(string) An optional path to the directory where the file will be written. If omitted, a global option \code{cmdstanr_write_stan_file_dir} is -used. If the global options is not set, \link[base:tempfile]{temporary directory} +used. If the global options is not set, \link[base:tempdir]{temporary directory} is used.} \item{basename}{(string) If \code{dir} is specified, optionally the basename to