fit-epi_workflow | R Documentation |
epi_workflow
objectThis is the fit()
method for an epi_workflow
object that
estimates parameters for a given model from a set of data.
Fitting an epi_workflow
involves two main steps, which are
preprocessing the data and fitting the underlying parsnip model.
## S3 method for class 'epi_workflow'
fit(object, data, ..., control = workflows::control_workflow())
object |
an |
data |
an |
... |
Not used |
control |
A |
The epi_workflow
object, updated with a fit parsnip
model in the object$fit$fit
slot.
workflows::fit-workflow
jhu <- covid_case_death_rates %>%
filter(time_value > "2021-11-01", geo_value %in% c("ak", "ca", "ny"))
r <- epi_recipe(jhu) %>%
step_epi_lag(death_rate, lag = c(0, 7, 14)) %>%
step_epi_ahead(death_rate, ahead = 7)
wf <- epi_workflow(r, parsnip::linear_reg()) %>% fit(jhu)
wf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.