Learn R Programming

x12 (version 1.0-2)

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

Description

Seasonal factor plots with function plotSeasFac in package x12.

Usage

## S3 method for class 'x12Output':
plotSeasFac(x,SI_Ratios=TRUE, ylab="Value", xlab="",
				lwd_seasonal=1, col_seasonal="black", lwd_mean=1, col_mean="blue", col_siratio="darkgreen",
				col_replaced="red", cex_siratio=.9, cex_replaced=.9, SI_Ratios_replaced=TRUE, plot_legend=TRUE, ...)
## S3 method for class 'x12Single':
plotSeasFac(x,SI_Ratios=TRUE, ylab="Value", xlab="",
				lwd_seasonal=1, col_seasonal="black", lwd_mean=1, col_mean="blue", col_siratio="darkgreen",
				col_replaced="red", cex_siratio=.9, cex_replaced=.9, SI_Ratios_replaced=TRUE, plot_legend=TRUE, ...)

Arguments

x
object of class x12Output-class or x12Single-class.
SI_Ratios
logical specifying if the SI ratios should be plotted.
ylab
label of the y-axis.
xlab
label of the x-axis.
lwd_seasonal
line width of the seasonal factors.
col_seasonal
color of the seasonal factors.
lwd_mean
line width of the mean.
col_mean
color of the mean.
col_siratio
color of the SI ratios.
col_replaced
color of the replaced SI ratios.
cex_siratio
magnification factor for the size of the symbols used for plotting the SI ratios.
cex_replaced
magnification factor for the size of the symbols used for plotting the replaced SI ratios.
SI_Ratios_replaced
logical specifying if the replaced SI ratios should be plotted.
plot_legend
logical specifying if a legend should be plotted.
...
ignored.

See Also

X12, plot, plotSpec, 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))
s <- X12(s)
#w/o outliers
plot(s@x12Output,sa=TRUE,trend=TRUE,original=FALSE)
plot(s)
#with (all) outliers
plot(s,showAllout=TRUE,sa=TRUE,trend=TRUE,log_transform=TRUE,lwd_out=1,pch_ao=4)
plot(s,showAllout=TRUE,sa=TRUE,trend=TRUE,original=FALSE,showAlloutLines=TRUE,col_tc="purple")#,log_transform=TRUE)#,lwd_out=3)
#with showOut
plot(s,showOut="AO1960.Jun",sa=FALSE,trend=FALSE,annComp=TRUE,log_transform=TRUE)
plot(s,showOut="AO1958.Mar",sa=TRUE,trend=TRUE,annComp=TRUE,annCompTrend=FALSE)
plot(s,showOut="AO1950.Jun",annComp=FALSE,cex_out=3,pch_ao=19,col_ao="orange")
plot(s,showOut="TC1954.Feb")
plot(s,showOut="TC1954.Feb",col_tc="green3")

#w/o legend
plot(s,showAllout=TRUE,plot_legend=FALSE)
plot(s,plot_legend=FALSE)
plot(s,showOut="AO1950.1",plot_legend=FALSE,lwd_out=2,col_ao="purple")
plot(s,showOut="TC1954.Feb",col_tc="orange",col_ao="magenta",plot_legend=FALSE)
plot(s,showOut="AO1950.1",col_tc="orange",col_ao="magenta",plot_legend=FALSE)

#Forecasts & Backcasts
plot(s,forecast=TRUE)
plot(s,backcast=TRUE,showLine=TRUE)
plot(s,backcast=TRUE,forecast=TRUE,showCI=FALSE)
plot(s,forecast=TRUE,points_fc=TRUE,col_fc="purple",lty_fc=2,lty_original=3,lwd_fc=0.9,lwd_ci=2)
plot(s,sa=TRUE,plot_legend=FALSE)

#Seasonal Factors and SI Ratios
plotSeasFac(s)
#Spectra
plotSpec(s)
plotSpec(s,highlight=FALSE)
#Autocorrelations of the Residuals
plotRsdAcf(s)
plotRsdAcf(s,col_acf="black",lwd_acf=1)

Run the code above in your browser using DataLab