Description Usage Arguments Details
This function calls bayesian_filter
repeatedly to fit an
evolving set of parameters to a dataset. The result is organized into a
table of model state and parameters over time.
1 2 3 4 5 6 7 8 9 | fit_filter(
initstates,
obsdata,
tinit,
tfinal,
hospdata = NULL,
history = TRUE,
ids = NULL
)
|
initstates |
Matrix containing ensemble of initial states and parameter
values (see description in |
obsdata |
Observed data to use in the fit |
tinit |
Initial time corresponding to the states provided in
|
hospdata |
Hospitalization data to use in the fit. |
history |
Detailed history for the individual ensemble members (see details). |
ids |
List of serial numbers for the ensemble members. This is only used if we are keeping history. See details for why you might want to specify this explicitly. |
tfin |
Final time (i.e., the time of the last observation to use in fitting the filter) |
The history
argument allows us to optionally keep detailed histories
for the individual ensemble members, including beta, imports, I, Is, and
Itot. Otherwise, the only history you get is is summary statistics (median
and 95
either pass in the history output from a previous run (the new history will
be appended), or if earlier history is not available, set to any non-null
value (the new history will be returned).
If history is being kept, then we need to assign serial numbers to the ensemble members. By default, these are assigned sequentially, but there are reasons why they might need to be specified explicitly. One is if the ensemble matrix is reordered for some reason. The other is if some ensemble members are dropped or replaced.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.