coverage: Empirical coverage of a prediction interval

View source: R/scoreForecast.R

coverageR Documentation

Empirical coverage of a prediction interval

Description

Empirical coverage of a prediction interval

Usage

coverage(observed, lo, hi)

Arguments

observed

numeric vector of realized values

lo, hi

numeric vectors giving the lower/upper interval bounds

Value

the fraction of observations falling within ⁠[lo, hi]⁠

Examples

coverage(c(5, 15, 25), c(0, 10, 20), c(10, 20, 30))

RtForecastR documentation built on Nov. 25, 2026, 9:09 a.m.