avgPinball: Calculate the average pinball across multiple quantiles

Description Usage Arguments Value Examples

View source: R/utils.R

Description

avgPinball calls pinball across a range of quantiles and returns the average

Usage

1
avgPinball(qdt, quants)

Arguments

qdt

a data table containing actuals and predicted quantiles

quants

the target quantiles 0 < quantile < 1 to assess

Value

the average pinball score across the samples and quantiles

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
qdt = data.table(act=rep(2700,3),
                 q0.1 = c(2600,2500,2500),
                 q0.5=c(2900,2800,2700),
                 q0.9 = c(3100, 3000, 2900))
qnts = c(0.1, 0.5, 0.9)
avgPinball( qdt, qnts) # should return 32.22

## End(Not run)

tvwallace/gefcom17Model documentation built on Jan. 23, 2021, 12:48 a.m.