Not a user-side function. Do not call directly. Exported for infrastructure reasons only.
Usage
tar_jags_df(
fit,
data,
output = c("draws", "summary", "dic"),
variables = NULL,
summaries = NULL,
summary_args = NULL,
transform = NULL
)
Arguments
- fit
R2jags
object.- data
A list, the original JAGS dataset.
- output
Character of length 1 denoting the type of output
tibble
to return:"draws"
for MCMC samples (which could take up a lot of space)"summary"
for lightweight posterior summary statistics, and"dic"
for the overall deviance information criterion and effective number of parameters.- variables
Character vector of model parameter names. The output posterior summaries are restricted to these variables.
- summaries
List of summary functions passed to
...
inposterior::summarize_draws()
through$summary()
on theCmdStanFit
object.- summary_args
List of summary function arguments passed to
.args
inposterior::summarize_draws()
through$summary()
on theCmdStanFit
object.- transform
Symbol or
NULL
, name of a function that accepts argumentsdata
anddraws
and returns a data frame. Here,data
is the JAGS data list supplied to the model, anddraws
is a data frame with one column per model parameter and one row per posterior sample. Any arguments other thandata
anddraws
must have valid default values becausejagstargets
will not populate them. See the simulation-based calibration discussion thread at https://github.com/ropensci/jagstargets/discussions/31 for an example.