predict.qreg_gam: Predict from model based on Generalised Additive Model and...

predict.qreg_gamR Documentation

Predict from model based on Generalised Additive Model and Linear Quantile Regression

Description

This function predicts from multiple conditional linear quantile regression models of the residuals of a generalised additive model fit using qreg_gam.

Usage

## S3 method for class 'qreg_gam'
predict(
  object,
  newdata = NULL,
  quantiles = NULL,
  model_name = NULL,
  sort = T,
  sort_limits = NULL
)

Arguments

object

An qreg_gam object containing the model to predict from.

newdata

A data frame or data table containing the values of the model covariates at which predictions are required.

quantiles

The probability levels at which quantile predictions should be produced.

model_name

The name of the model in object to be used for prediction. E.g. Specific cross-vlaidation fold, test model or some other version.

sort

boolean Sort quantiles using SortQuantiles()?

sort_limits

Limits argument to be passed to SortQuantiles(). Constrains quantiles to upper and lower limits given by list(U=upperlim,L=lowerlim).

Details

Predict method for multiple quantile regression models of the class qreg_gam.

Value

A list with elements gam_pred, deterministic predictions (conditional expectation) from main GAM model, and mqr_pred, multiple predictive quantiles in a MultiQR object.

Author(s)

Jethro Browell, jethro.browell@glasgow.ac.uk


jbrowell/ProbCast documentation built on July 20, 2024, 1:53 p.m.