R/calibration.R
compute_calibration.Rd
Estimate calibration given forecasts and corresponding outcomes
compute_calibration(
forecast,
outcome,
method = c("smoothing", "binning"),
CI = NULL,
binwidth = NULL,
...
)
Vector of probability forecasts.
Vector of observations (0 or 1).
Method used to estimate calibration, either "smoothing"
or "binning"
.
Confidence level (e.g. 0.95).
CI not computed if NULL
(CI can be expensive to compute for LOWESS).
Binwidth when calibration is estimated by binning.
If NULL
, automatic bin width selection with Sturges' method.
Arguments of stats::loess()
function (e.g. span).
Dataframe with columns Forecast
(bins), Frequency
(frequency of outcomes in the bin),
Lower
(lower bound of the CI) and Upper
(upper bound of the CI).