Skip to contents

Extracts raw posterior samples from a Stan fit object and post-processes them, including merging with a fact table and standardizing the parameter names. If calling process_quantiles() the 50% and 95% intervals are returned in {tidybayes} format.

Usage

process_samples(fit, geo_value, model, disease)

process_quantiles(fit, geo_value, model, disease, quantile_width)

Arguments

fit

An EpiNow2 fit object with posterior estimates.

geo_value

An uppercase, two-character string specifying the geographic value, usually a state or "US" for national data.

model

A string specifying the model to be used.

disease

A string specifying the disease being modeled. One of "COVID-19" or "Influenza".

quantile_width

A vector of numeric values representing the desired quantiles. Passed to tidybayes::median_qi().

Value

A data.table of posterior draws or quantiles, merged and processed.

See also