Compute CRPS for a predictive distribution represented by Monte Carlo draws and one observed value.
In practical terms, CRPS measures how well the full predictive distribution matches what we observed. It rewards two things at once:
proximity to the observed value,
appropriate concentration (not unnecessarily wide predictions).
Lower values indicate better predictive fit.
Value
A numeric scalar CRPS value (lower is better), or NA_real_ when
observed is NA or no non-missing draws are available.
Examples
draws <- c(0.1, 0.2, 0.3, 0.4)
crps_draws(draws, observed = 0.25)
#> [1] 0.0375