rel_diag_vec {SeaVal} | R Documentation |
Reliability diagram from vectors of probabilities and observations
Description
The probabilities have to be rounded beforehand (see round_probs
), because the diagram draws a point for each level of the probabilities. The diagram includes a histogram indicating
the forecast relative frequency for each probability bin. The diagram shows the reliability curve and the diagonal for reference.
Moreover, it shows a regression line fitted by weighted linear regression where the forecast relative frequencies are used as weights.
A horizontal and vertical line indicate the frequency of observation = TRUE over the entire dataset.
Usage
rel_diag_vec(discrete_probs, obs, slope_only = FALSE)
Arguments
discrete_probs |
Vector of (rounded) probabilites. |
obs |
Vector of logical observations. |
slope_only |
logical. If set to TRUE, only the slope of the reliability curve is returned |
Value
A gg object.
Examples
discrete_probs = seq(0,1,length.out = 5)
obs = c(FALSE,FALSE,TRUE,TRUE,TRUE)
pp = rel_diag_vec(discrete_probs,obs)
if(interactive()) plot(pp)
[Package SeaVal version 1.2.0 Index]