Wrapper function to fit the "aggregated" model, which takes in a single obervation of hospital admissions and wastewater data per time point
Usage
fit_aggregated_model(
train_data,
params,
model_file,
forecast_date,
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,
seed,
output_dir,
write_files = TRUE,
...
)
Arguments
- train_data
dataframe containing a single locations observed hospital admissions and observed wastewater concentrations, with no more than one wastewater data stream for each time point
- params
disease-specific parameters, including hyperparameters for priors.
- model_file
the compiled stan model
- forecast_date
date of the forecast
- forecast_time
duration of the forecast period
- model_type
name of the model being fit. Options are:
"state-level aggregated wastewater"
- generation_interval
a discretized (in days) normalized pmf indexed starting at 1 of the probability of each time from initial infection to secondary transmission
- inf_to_hosp
a discretized (in days) normalized pmf indexed starting at 0 of the probability of time from initial infection to hospital admissions
- infection_feedback_pmf
a discretized (in days) normalized pmf that dictates the distribution of delays from incident infection to incidence feedback
- include_hosp
whether or not to include hospital admissions data in the likelihood to include
- compute_likelihood
whether or not to include any data in the likelihood, if set to 0 returns prior predictions
- n_draws
number of draws to save in the draws.parquet
- n_chains
number of independent MCMC chains to run
- iter_sampling
number of iterations to save in MCMC sampling
- iter_warmup
number of iterations to discard in MCMC sampling
- n_parallel_chains
number of chains to run in parallel, default = 4
- adapt_delta
target proposal acceptance probability for the No-U-Turn Sampler. sampler
- max_treedepth
max value in exponents of 2 of what the binary tree size in the NUTS algorithm should have
- seed
random seed for the sampler
- output_dir
location to save the model outputs
- write_files
whether or not to save the outputs, default = 1 to save
- ...
Additional named arguments (ignored) to allow
do.call()
on lists with additional entries