Description Usage Arguments Value Note Author(s) Examples
Converts continuous forecast values into discrete forecast values. This is necessary in calculating the quantile score decomposition. Discrete forecasts are defined by the mean value of forecasts within a bin specified by the bin vector (bin boundaries).
1 | quantile2disc(x, bins)
|
x |
A vector of forecast values |
bins |
Vector with bin boundaries |
new |
New vector x (continuous forecast values replaced with disretized forecast values) |
mids |
Vector of discrete forecast values |
This function is used within quantileScore
.
Sabrina Bentzien
1 2 3 4 | x <- rnorm(100)
bins <- quantile(x,seq(0,1,length.out=11))
newx <- quantile2disc(x,bins)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.