Not a user-side function. Do not invoke directly.
Usage
tar_stan_output(
fit,
output_type,
summaries,
summary_args,
transform,
variables,
inc_warmup,
data,
data_copy,
seed
)
Arguments
- fit
A Stan fit object.
- output_type
Type of output to create, either
"summaries"
,"draws"
, or"diagnostics"
.- summaries
Optional list of summary functions passed to
...
inposterior::summarize_draws()
through$summary()
on theCmdStanFit
object.- summary_args
Optional 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 becausestantargets
will not populate them. See the simulation-based calibration (SBC) section of the simulation vignette for an example.- variables
(character vector) The variables to include.
- inc_warmup
Logical, whether to include the warmup draws.
- data
List, Stan dataset.
- data_copy
Character vector of names of scalars in
data
. These values will be inserted as columns in the output data frame for each rep. To join more than just scalars, include a.join_data
element of your Stan data list with names and dimensions corresponding to those of the model. For details, read https://docs.ropensci.org/stantargets/articles/simulation.html.- seed
Integer vector, random number generator seed used to run Stan.