View source: R/arx_forecaster.R
arx_forecaster | R Documentation |
This is an autoregressive forecasting model for epiprocess::epi_df data. It does "direct" forecasting, meaning that it estimates a model for a particular target horizon.
arx_forecaster(
epi_data,
outcome,
predictors = outcome,
trainer = linear_reg(),
args_list = arx_args_list()
)
epi_data |
An |
outcome |
A character (scalar) specifying the outcome (in the
|
predictors |
A character vector giving column(s) of predictor variables.
This defaults to the |
trainer |
A |
args_list |
A list of customization arguments to determine
the type of forecasting model. See |
A list with (1) predictions
an epi_df
of predicted values
and (2) epi_workflow
, a list that encapsulates the entire estimation
workflow
arx_fcast_epi_workflow()
, arx_args_list()
jhu <- covid_case_death_rates %>%
dplyr::filter(time_value >= as.Date("2021-12-01"))
out <- arx_forecaster(
jhu, "death_rate",
c("case_rate", "death_rate")
)
out <- arx_forecaster(jhu, "death_rate",
c("case_rate", "death_rate"),
trainer = quantile_reg(),
args_list = arx_args_list(quantile_levels = 1:9 / 10)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.