round_probs {SeaVal}R Documentation

auxiliary function for rounding probabilities

Description

takes a vector of probabilities (between 0 and 1) and rounds them to the scale specified by binwidth. This is used for reliability diagrams, where one point is drawn for each bin. 0 is always at the center of the first interval for rounding: E.g. if binwidth = 0.05 (the default), then probabilities up to 0.025 are rounded to 0, probs between 0.025 and 0.075 are rounded to 0.05, etc.

Usage

round_probs(probs, binwidth = 0.05)

Arguments

probs

vector of probabilities (between 0 and 1, not percent)

binwidth

width of the bins for rounding.

Value

vector with rounded probabilities

Examples

round_probs(c(0.001,0.7423))

[Package SeaVal version 1.2.0 Index]