plotCoverage: Coverage Probability Plot

Description Usage Arguments Details Value Author(s) References Examples

View source: R/plotCoverage.R

Description

Generates a coverage probability plot showing coverage probability estimates, corresponding error bands, and nominal coverage probability.

Usage

1
2
plotCoverage(af, pi, methods = NULL, horizons = NULL,
  conf.level = 0.95, coord.flip = FALSE)

Arguments

af

dataframe containing forecast data formatted using the Actual and Forecast Table Schema (AFTS), use showAFTS() to display schema specification details.

pi

nominal coverage probability (confidence level for the prediction interval to be assessed).

methods

array containing method_id values for methods to be shown on the graph, if NULL, all available methods will be shown.

horizons

array containing horizons to be shown on the graph, if NULL, all available horizons will be shown.

conf.level

confidence level for coverage probability estimates, default 0.95.

coord.flip

use FALSE for horizontal bar chart, TRUE for vertical.

Details

Generates a bar chart showing coverage percentages for the given nominal coverage (Sai, Davydenko, and Shcherbakov, 2018). The results are confined to methods contained in methods and horizons contained in horizons. Adds error bars and nominal coverage line to chart.

Value

Returns a ggplot2 object containing the coverage probability plot.

Author(s)

Cuong Sai, Andrey Davydenko, and Maxim Shcherbakov.

References

Sai, C., Davydenko, A., & Shcherbakov, M. (2018, November). Data schemas for forecasting (with examples in R). Seventh International Conference on System Modelling & Advancement on Research Trends, 145-149. Moradabad, India.

Examples

1
2
3
af <- createAFTS(example1_ts, example1_fc)
plotCoverage(af, pi = 90, methods = c("A", "B"))
plotCoverage(af, pi = 90, horizons = 1:2)

forvis/forvision documentation built on April 30, 2020, 3:28 a.m.