epi_workflow | R Documentation |
This is a container object that unifies preprocessing, fitting, prediction,
and postprocessing for predictive modeling on epidemiological data. It extends
the functionality of a workflows::workflow()
to handle the typical panel
data structures found in this field. This extension is handled completely
internally, and should be invisible to the user. For all intents and purposes,
this operates exactly like a workflows::workflow()
. For more details
and numerous examples, see there.
epi_workflow(preprocessor = NULL, spec = NULL, postprocessor = NULL)
preprocessor |
An optional preprocessor to add to the workflow. One of:
|
spec |
An optional parsnip model specification to add to the workflow.
Passed on to |
postprocessor |
An optional postprocessor to add to the workflow.
Currently only |
A new epi_workflow
object.
workflows::workflow
jhu <- covid_case_death_rates
r <- epi_recipe(jhu) %>%
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7) %>%
step_epi_lag(case_rate, lag = c(0, 7, 14)) %>%
step_epi_naomit()
wf <- epi_workflow(r, parsnip::linear_reg())
wf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.