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

quantile2disc

Convert Continuous Forecast Values to Discrete Forecast Values.


Description

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).

Usage

quantile2disc(x, bins)

Arguments

x

A vector of forecast values

bins

Vector with bin boundaries

Value

new

New vector x (continuous forecast values replaced with disretized forecast values)

mids

Vector of discrete forecast values

Note

This function is used within quantileScore.

Author(s)

Sabrina Bentzien

Examples

x <- rnorm(100)
bins <- quantile(x,seq(0,1,length.out=11))

newx <- quantile2disc(x,bins)

verification

Weather Forecast Verification Utilities

v1.42
GPL (>= 2)
Authors
NCAR - Research Applications Laboratory
Initial release
2015-07-10

We don't support your browser anymore

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