Learn R Programming

x12 (version 1.0-2)

crossVal: ~~ Methods for Function crossVal in Package x12 ~~

Description

Cross Validation with function crossVal in package x12.

Usage

## S3 method for class 'ts':
crossVal(object, x12Parameter, x12BaseInfo,
		showCI=FALSE, main="Cross Validation",
		col_original="black", col_fc="#2020ff", col_bc="#2020ff",
		col_ci="#d1d1ff", col_cishade="#d1d1ff",
		lty_original=1, lty_fc=1, lty_bc=1, lty_ci=1,
		lwd_original=1, lwd_fc=1, lwd_bc=1, lwd_ci=1, ytop=1,
		points_bc=FALSE, points_fc=FALSE, points_original=FALSE,
		showLine=TRUE, col_line="grey", lty_line=3,
		ylab="Value", xlab="Date")
## S3 method for class 'x12Single':
crossVal(object, x12BaseInfo=new("x12BaseInfo"),
		showCI=FALSE, main="Cross Validation",
		col_original="black", col_fc="#2020ff", col_bc="#2020ff",
		col_ci="#d1d1ff", col_cishade="#d1d1ff",
		lty_original=1, lty_fc=1, lty_bc=1, lty_ci=1,
		lwd_original=1, lwd_fc=1, lwd_bc=1, lwd_ci=1, ytop=1,
		points_bc=FALSE, points_fc=FALSE, points_original=FALSE,
		showLine=TRUE, col_line="grey", lty_line=3,
		ylab="Value", xlab="Date")

Arguments

object
object of class ts or x12Single-class.
x12Parameter
object of class x12Parameter.
x12BaseInfo
object of class x12BaseInfo.
showCI
logical specifying if the prediction interval should be plotted.
main
plot title.
col_original
color of the original time series.
col_fc
color of the forecasts.
col_bc
color of the backcasts.
col_ci
color of the prediction interval.
col_cishade
color of the shading of the prediction interval.
lty_original
line type of the original time series.
lty_fc
line type of the forecasts.
lty_bc
line type of the backcasts.
lty_ci
line type of the prediction interval.
lwd_original
line width of the original time series.
lwd_fc
line width of the forecasts.
lwd_bc
line width of the backcasts.
lwd_ci
line width of the prediction interval.
ytop
multiplication factor for ylim.
points_bc
logical specifying if backcasts should additionally be indicated with points.
points_fc
logical specifying if forecasts should additionally be indicated with points.
points_original
logical specifying if the original time series should additionally be indicated with points.
showLine
logical indicating if a boundary line should be drawn before/after fore-/backcasts.
col_line
color of showLine.
lty_line
line type of showLine.
ylab
label of y-axis.
xlab
label of x-axis.

Value

See Also

X12, plot, plotSpec, plotSeasFac, plotRsdAcf

Examples

Run this code
s <- new("x12Single",ts=AirPassengers,tsName="air")
s <- setP(s,list(estimate=TRUE,regvariables="AO1950.1",outlier="all",critical=list(LS=3.5,TC=2.5),
backcast_years=1/2,forecast_years=1))

cv<-crossVal(s,showLine=TRUE)
cv

Run the code above in your browser using DataLab