Skip to contents

Get a data frame of data and model fit diagnostics

Usage

get_diagnostics(
  stan_fit_object,
  train_data,
  location,
  model_type,
  forecast_date,
  ebmfi_tolerance = 0.2,
  divergences_tolerance = 0.01,
  p_high_rhat_tolerance = 0.05,
  max_tree_depth_tol = 0.01,
  ...
)

Arguments

stan_fit_object

The cmdstan object

train_data

The dataframe containing hospital admissions and wastewater data for callibration of the model

location

The location the model is being run on

model_type

The type of model

forecast_date

The date of the forecast

ebmfi_tolerance

tolerance for mean EBMFI, default of 0.2

divergences_tolerance

tolerance for percent of iterations that are divergent from an individual chain

p_high_rhat_tolerance

tolerance for probability of high p_hat, default 0.05

max_tree_depth_tol

tolerance for number of draws that hit the maximum tree depth, default to 0.01

...

Value

Returns a dataframe containing diagnostic summaries