| get_samples | R Documentation |
Extracts posterior samples from a fitted model, combining all parameters into a single data.table with dates and metadata.
get_samples(object, ...)
## S3 method for class 'estimate_infections'
get_samples(object, ...)
## S3 method for class 'epinow'
get_samples(object, ...)
## S3 method for class 'forecast_infections'
get_samples(object, ...)
## S3 method for class 'estimate_secondary'
get_samples(object, ...)
## S3 method for class 'forecast_secondary'
get_samples(object, ...)
## S3 method for class 'estimate_truncation'
get_samples(object, ...)
object |
A fitted model object (e.g., from |
... |
Additional arguments (currently unused) |
A data.table with columns: date, variable, strat, sample, time,
value, type. Contains all posterior samples for all parameters.
## Not run:
# After fitting a model
samples <- get_samples(fit)
# Filter to specific parameters
R_samples <- samples[variable == "R"]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.