estimate_qra: Estimate Quantile Regression Averaging model

View source: R/qra_fit.R

estimate_qraR Documentation

Estimate Quantile Regression Averaging model

Description

Estimate Quantile Regression Averaging model

Usage

estimate_qra(
  qfm_train,
  y_train,
  qfm_test = NULL,
  intercept = FALSE,
  combine_method = c("ew", "convex", "positive", "unconstrained", "median"),
  quantile_groups = NULL,
  noncross = "constrain",
  backend = "optim",
  max_weight = NULL,
  partial_save_frequency,
  partial_save_filename,
  ...
)

Arguments

qfm_train

QuantileForecastMatrix with training set predictions

y_train

numeric vector of responses for training set

qfm_test

QuantileForecastMatrix with test set predictions

intercept

logical specifying whether an intercept is included

combine_method

character specifying the approach to model combination: "equal", "convex", "positive", "unconstrained", or "median". The first four form a linear combination of quantiles across component models with varying levels of restrictions on the combination coefficients. "median" takes the median across models at each quantile level.

quantile_groups

Vector of group labels for quantiles, having the same length as the number of quantiles. Common labels indicate that the ensemble weights for the corresponding quantile levels should be tied together. Default is rep(1,length(quantiles)), which means that a common set of ensemble weights should be used across all levels. This is the argument tau_groups for quantgen::quantile_ensemble, and may only be supplied if ⁠backend = 'quantgen⁠

noncross

string specifying approach to handling quantile noncrossing: one of "constrain" or "sort". "constrain" means estimation is done subject to constraints ruling out quantile crossing. "sort" means no such constraints are imposed during estimation, but the resulting forecasts are sorted.

backend

implementation used for estimation; currently either 'optim', using L-BFGS-B as provided by the optim function in R; 'NlcOptim', using NlcOptim::solnl; or 'quantgen', using quantgen::quantile_ensemble

max_weight

numeric value for maximum weight. Ignored unless qra_model is rel_wis_weighted_median or rel_wis_weighted mean and backend is grid_search

Value

object of class qra_fit


reichlab/covidEnsembles documentation built on Jan. 31, 2024, 7:21 p.m.