Skip to content

Commit ca1a41e

Browse files
committed
added documentation for userEnv argument to nimbleHMC
1 parent d57b1f4 commit ca1a41e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nimbleHMC/R/HMC_configuration.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,11 @@ buildHMC <- function(model, nodes = character(), type = 'NUTS', control = list()
256256
#' @param samplesAsCodaMCMC Logical argument. If \code{TRUE}, then a \code{coda} \code{mcmc} object is returned instead of an R matrix of samples, or when \code{nchains > 1} a \code{coda} \code{mcmc.list} object is returned containing \code{nchains} \code{mcmc} objects. This argument is only used when \code{samples} is \code{TRUE}. Default value is \code{FALSE}. See details.
257257
#'
258258
#' @param summary Logical argument. When \code{TRUE}, summary statistics for the posterior samples of each parameter are also returned, for each MCMC chain. This may be returned in addition to the posterior samples themselves. Default value is \code{FALSE}. See details.
259-
#'z
259+
#'
260260
#' @param WAIC Logical argument. When \code{TRUE}, the WAIC (Watanabe, 2010) of the model is calculated and returned. If multiple chains are run, then a single WAIC value is calculated using the posterior samples from all chains. Default value is \code{FALSE}. Note that the version of WAIC used is the default WAIC conditional on random effects/latent states and without any grouping of data nodes. See \code{help(waic)} for more details.
261261
#'
262+
#' @param userEnv Environment in which if-then-else statements in model code will be evaluated if needed information not found in \code{constants}; intended primarily for internal use only.
263+
#'
262264
#' @return A list is returned with named elements depending on the arguments, unless only one among samples, summary, and WAIC are requested, in which case only that element is returned. These elements may include \code{samples}, \code{summary}, and \code{WAIC}. When \code{nchains = 1}, posterior samples are returned as a single matrix, and summary statistics as a single matrix. When \code{nchains > 1}, posterior samples are returned as a list of matrices, one matrix for each chain, and summary statistics are returned as a list containing \code{nchains+1} matrices: one matrix corresponding to each chain, and the final element providing a summary of all chains, combined. If \code{samplesAsCodaMCMC} is \code{TRUE}, then posterior samples are provided as \code{coda} \code{mcmc} and \code{mcmc.list} objects. When \code{WAIC} is \code{TRUE}, a WAIC summary object is returned.
263265
#'
264266
#' @details

0 commit comments

Comments
 (0)