Skip to contents

Takes in the training data, which is a long dataframe with all the site level WW observations plus the observed hospitalizations. Fit the stan model to a single slice of data

Usage

fit_model(
  train_data,
  params,
  model_file,
  forecast_date,
  run_id,
  date_run,
  forecast_time,
  model_type,
  generation_interval,
  inf_to_hosp,
  infection_feedback_pmf,
  include_hosp,
  compute_likelihood,
  n_draws,
  n_chains,
  iter_sampling,
  iter_warmup,
  n_parallel_chains,
  adapt_delta,
  max_treedepth,
  output_file_path,
  write_files = TRUE,
  ...
)

Arguments

train_data

for a single location

params

of the model, these should be the same across all runs

model_file

compiled stan model (an upstream target)

write_files

Value

a dataframe with 100 model draws for all time points for WW concentraiton, hospitalizaitons, hosp per 100k, and the matched data