Learn R Programming

SeaVal (version 1.1.1)

round_probs: 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)

Value

vector with rounded probabilities

Arguments

probs

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

binwidth

width of the bins for rounding.

Examples

Run this code
round_probs(c(0.001,0.7423))

Run the code above in your browser using DataLab