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

probcont2disc

Converts continuous probability values into binned discrete probability forecasts.


Description

Converts continuous probability values into binned discrete probability forecasts. This is useful in calculated Brier type scores for values with continuous probabilities. Each probability is assigned the value of the midpoint.

Usage

probcont2disc(x, bins = seq(0,1,0.1) )

Arguments

x

A vector of probabilities

bins

Bins. Defaults to 0 to 1 by 0.1 .

Value

A vector of discrete probabilities. E

Note

This function is used within brier.

Author(s)

Matt Pocernich

Examples

#  probabilistic/ binary example

set.seed(1)
x <- runif(10) ## simulated probabilities.

probcont2disc(x)
probcont2disc(x, bins = seq(0,1,0.25) )

## probcont2disc(4, bins = seq(0,1,0.3)) ## gets error

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.