This function produces a fan chart of sequential (one-step-ahead) forecasts
with dots for the observed values, using surveillance::fanplot(), which
itself wraps fanplot::fan(). A matplot() of score
values at each time point is added below ("slicing").
Arguments
- quantiles
a time x
probsmatrix of forecast quantiles at each time point.- probs
numeric vector of probabilities with values between 0 and 1.
- means
(optional) numeric vector of point forecasts at each time point.
- observed
(optional) numeric vector of observed values.
- scores
(optional) numeric vector (or matrix) of associated scores.
- start
time index (x-coordinate) of the first prediction.
- xlab
x-axis label.
- fan.args
a list of graphical parameters for the
fanplot::fan(), e.g., to employ a differentcolorRampPalette()asfan.col, or to enable contour lines vialn.- means.args
a list of graphical parameters for
lines()to modify the plotting style of the point predictions.- observed.args
a list of graphical parameters for
lines()to modify the plotting style of theobservedvalues.- key.args
if a list, a color key (in
fanplot::fan()'s"boxfan"-style) is added to the fan chart. The list may include positioning parametersstart(the x-position) andylim(the y-range of the color key),spaceto modify the width of the color key, andrlabto modify the labels. An alternative way of labeling the quantiles is via the argumentlninfan.args.- ...
further arguments are passed to
plot.default().- scores.args
a list of graphical parameters for
matplot()to modify the style of thescoressubplot at the bottom.- legend.args
if a list (of parameters for
legend()) andncol(scores) > 1, a legend is added to thescoressubplot.- heights
numeric vector of length 2 specifying the relative height of the two subplots.