MQR_qreg_gam | R Documentation |
OLD VERSION SUPERCEDED BY qreg_gam
. This function fits multiple conditional linear quantile regression models to the residuals of
a generalised additive model using mgcv
and with facilities for cross-validation.
MQR_qreg_gam(
data,
formula,
formula_qr = NULL,
model_res2 = F,
formula_res2 = formula,
quantiles = c(0.25, 0.5, 0.75),
CVfolds = NULL,
...,
use_bam = T,
w = rep(1, nrow(data)),
Sort = T,
SortLimits = NULL
)
data |
A |
formula_qr |
Formula for linear quantile regression model for GAM residuals. Term |
model_res2 |
If |
formula_res2 |
Formula for GAM to predict squared residuals. |
quantiles |
The quantiles to fit models for. |
... |
Additional agruments passter to |
use_bam |
If |
w |
Weights on the contribution of data to model fit. See |
Sort |
|
SortLimits |
|
formala |
A |
gbm_params |
List of parameters to be passed to |
cv_folds |
Control for cross-validation if not supplied in |
The returned predictive quantiles and GAM predictions are those produced out-of-sample for each cross-validation fold (using models trained on the remaining folds but not "Test" data). Predictive quantiles corresponding to "Test" data are produced using models trained on all non-test data.
Returns a list
containing predictive quantiles (in a MultiQR
object), GAM models, and deterministic predictions
from GAMs.
Jethro Browell, jethro.browell@strath.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.