Extracts posterior samples from a fitted model. By default, combines all
parameters into a single <data.table> with dates and metadata added.
Usage
get_samples(object, ...)
# S3 method for class 'estimate_infections'
get_samples(object, format = c("data.table", "list"), ...)
# S3 method for class 'epinow'
get_samples(object, format = c("data.table", "list"), ...)
# S3 method for class 'forecast_infections'
get_samples(object, ...)
# S3 method for class 'estimate_secondary'
get_samples(object, format = c("data.table", "list"), ...)
# S3 method for class 'forecast_secondary'
get_samples(object, ...)
# S3 method for class 'estimate_truncation'
get_samples(object, format = c("data.table", "list"), ...)Arguments
- object
A fitted model object (e.g., from
estimate_infections())- ...
Additional arguments (currently unused)
- format
Character string specifying the output format. For model classes backed by a Stan fit (
estimate_infections,epinow,estimate_secondary,estimate_truncation):"data.table"(default): a long-format<data.table>with dates and other metadata added."list": the raw named list of arrays as returned byrstan::extract(), with no dates or metadata added.
