Title: | Forecast ensembles using Quantile Regression Average (QRA) |
---|---|
Description: | Performs quantile regression average |
Authors: | Sebastian Funk [aut, cre] , Sam Abbott [aut] |
Maintainer: | Sebastian Funk <[email protected]> |
License: | MIT + file LICENSE.md |
Version: | 0.1.3 |
Built: | 2024-12-06 06:28:06 UTC |
Source: | https://github.com/epiforecasts/qrensemble |
Quantile Regression Average Calculates a quantile regression average for forecasts.
qra( forecast, target, group = c(), model = "Quantile Regression Average", per_quantile_weights = FALSE, enforce_normalisation = TRUE, intercept = FALSE, noncross = TRUE, ... )
qra( forecast, target, group = c(), model = "Quantile Regression Average", per_quantile_weights = FALSE, enforce_normalisation = TRUE, intercept = FALSE, noncross = TRUE, ... )
forecast |
a data.table representing forecast; this is expected to
have been created using |
target |
the target for which to create the quantile regression
average. This should be given as a vector of form |
group |
any columns wihch to group a vector of character vectors (e.g.,
"horizon", "geography_scale", etc.) indicating columns in the
|
model |
the name of the model to return; default: "Quantile Regression Average" |
per_quantile_weights |
logical; whether to estimate weights per quantile |
enforce_normalisation |
logical; whether to enforce quantiles |
intercept |
logical; whether to estimate and intercept |
noncross |
logical; whether ot enforce non-crosssing of quantiles |
... |
passed to |
a data.table representing the forecasts forecast, but with
model
set to the value of the 'model parameter. This will be in the
forecast format produced by scoringutils::as_forecast_quantile()
library("scoringutils") example_quantile |> as_forecast_quantile() |> qra( group = c("target_type", "location", "location_name"), target = c(target_end_date = "2021-07-24") )
library("scoringutils") example_quantile |> as_forecast_quantile() |> qra( group = c("target_type", "location", "location_name"), target = c(target_end_date = "2021-07-24") )