crossVal
in Package x12 ~~Cross Validation with function crossVal
in package x12.
# S4 method for 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=2, lty_bc=2, 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",ylim=NULL,span=NULL)
# S4 method for 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=2, lty_bc=2, 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",ylim=NULL,span=NULL)
object of class ts
or x12Single-class
.
object of class x12Parameter
.
object of class x12BaseInfo
.
logical specifying if the prediction interval should be plotted.
plot title.
color of the original time series.
color of the forecasts.
color of the backcasts.
color of the prediction interval.
color of the shading of the prediction interval.
line type of the original time series.
line type of the forecasts.
line type of the backcasts.
line type of the prediction interval.
line width of the original time series.
line width of the forecasts.
line width of the backcasts.
line width of the prediction interval.
multiplication factor for ylim
.
logical specifying if backcasts should additionally be indicated with points.
logical specifying if forecasts should additionally be indicated with points.
logical specifying if the original time series should additionally be indicated with points.
logical indicating if a boundary line should be drawn before/after fore-/backcasts.
color of showLine
.
line type of showLine
.
label of y-axis.
label of x-axis.
range of the y-axis
vector of length 4, limiting the data used for the plot.
Start and end date of said time interval can be specified by 4 integers in the format c(start year, start seasonal period, end year, end seasonal period)
An S4 object of class crossValidation-class
.
signature(object = "ts")
%\item{\code{signature(object = "x12Batch")}}{ %% ~~describe this method here~~ %}
signature(object = "x12Single")
# NOT RUN {
s <- new("x12Single",ts=AirPassengers,tsName="air")
s <- setP(s,list(estimate=TRUE,regression.variables="AO1950.1",outlier.types="all",
outlier.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