Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pinLoss

Pinball loss function


Description

Evaluates the pinball loss.

Usage

pinLoss(y, mu, qu, add = TRUE)

Arguments

y

points at which the loss is evaluated.

mu

location parameter of the pinball loss.

qu

quantile level of the loss.

add

if TRUE the losses at which quantile level will be added up.

Value

A numeric vector or matrix of evaluate losses.

Author(s)

Matteo Fasiolo <matteo.fasiolo@gmail.com>.

Examples

n <- 1000
x <- seq(0, 4, length.out = n)
plot(x, pinLoss(x, rep(2, n), qu = 0.9, add = FALSE), type = 'l', ylab = "loss")

qgam

Smooth Additive Quantile Regression Models

v1.3.3
GPL (>= 2)
Authors
Matteo Fasiolo [aut, cre], Simon N. Wood [ctb], Margaux Zaffran [ctb], Yannig Goude [ctb], Raphael Nedellec [ctb]
Initial release
2021-04-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.