tsoutliersThis function displays the output from function tso.
# S3 method for tsoutliers
plot(x,
args.lines.y = list(col = "gray80"), args.lines.yadj = list(col = "blue"),
args.lines.effects = list(type = "s", col = "red"),
args.points = list(col = "gray80", bg = "red", pch = 21), plot.points = TRUE,
args.x.axis = list(at = pretty(time(x$y)), tcl = -0.5, lwd = 0, lwd.ticks = 1),
args.y.axis = list(at = pretty(x$y), tcl = -0.5, lwd = 0, lwd.ticks = 1),
args.effects.axis = list(at = pretty(x$effects), tcl = -0.5, lwd = 0, lwd.ticks = 1),
...)None.
a list of class tsoutliers as returned by tso.
a list. Arguments passed to lines to
customize the line displaying the original series.
a list. Arguments passed to lines to
customize the line displaying the series adjusted for outliers effects.
a list. Arguments passed to lines to
customize the line displaying the for outliers effects.
a list. Arguments passed to lines to
customize the points drawn if plot.points = TRUE.
a logical indicating whether the time points of the outliers should be drawn as points over the original series.
a list. Arguments to be passed to axis to customize
the x-axis (time).
a list. Arguments to be passed to axis to customize
the y-axis for the original series.
a list. Arguments to be passed to axis to customize
the y-axis for the outliers effects.
further arguments to be passed to par.
Instead of using the ellipsis, ..., arguments passed to other functions are
defined by means of a list. This approach is taken because there may be a single
argument name to be used in different parts of the plot with a different value.
For example, the argument col can be defined in args.lines.y to indicate
the color of the original series, e.g. col = "gray80"; at the same time
the color for the adjusted series can be defined in the list argument args.lines.yadj.
For further customizations, the source code of the function can be modified relatively
easy. Alternatively, a similar plot can be displayed simply as:
plot(cbind(x$y, x$yadj, x$effects), plot.type = "multiple").
In this way, the plot can be fully customized by setting the desired arguments to
to plot or to ancillary functions that can be called afterwards.
tso.