Learn R Programming

forecastSNSTS (version 1.3-0)

plot.measure-of-accuracy: Plot a MSPE or MAPE object

Description

The function plot.MSPE plots a MSPE object that is returned by the MSPE function. The function plot.MAPE plots a MAPE object that is returned by the MAPE function.

Usage

# S3 method for MSPE
plot(x, vr = NULL, h = 1, N_min = 1, legend = TRUE,
  display.mins = TRUE, add.for.legend = 0, ...)

# S3 method for MAPE plot(x, vr = NULL, h = 1, N_min = 1, legend = TRUE, display.mins = TRUE, add.for.legend = 0, ...)

Arguments

x

The MSPE or MAPE object to be plotted.

vr

parameter to plot a line at level vr. Intended to be used to plot the mean squared prediction error of the trivial, null predictor; optional.

h

Defines for which \(h\)-step predictor the mean squared prediction errors will be shown; default: 1.

N_min

If specified, the mean squared prediction errors with \(N < N_{\rm min}\) will not be shown; integer and optional.

legend

Flag to specify if a legend, indicating which colour of the lines corresponds to which \(p\), will be shown; default: TRUE.

display.mins

Flag to specify if the minima for each \(p\), and the minimum accross \(N=0\) will be highlighted.

add.for.legend

add this much extra space for the legend, right of the lines.

...

Arguments to be passed to the underlying plot method

Value

Returns the plot, as specified.

See Also

MSPE, MAPE