pinLoss: Pinball loss function

Description Usage Arguments Value Author(s) Examples

View source: R/pinLoss.R

Description

Evaluates the pinball loss.

Usage

1
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

1
2
3
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 documentation built on Nov. 23, 2021, 1:07 a.m.