plotSpec
in Package x12 ~~plotSpec-methods.Rd
Spectral plots with function plotSpec
in package x12.
signature(x = "x12Output",which="sa",
xlab="Frequency",ylab="Decibels",
main="Spectrum",
col_bar="darkgrey",col_seasonal="red",col_td="blue",
lwd_bar=4,lwd_seasonal=4,lwd_td=4,plot_legend=TRUE,...)
signature(x = "x12Single",which="sa",
xlab="Frequency",ylab="Decibels",
main="Spectrum",
col_bar="darkgrey",col_seasonal="red",col_td="blue",
lwd_bar=4,lwd_seasonal=4,lwd_td=4,plot_legend=TRUE,...)
signature(x = "spectrum",frequency,
xlab="Frequency",ylab="Decibels",
main="Spectrum",
col_bar="darkgrey",col_seasonal="red",col_td="blue",
lwd_bar=4,lwd_seasonal=4,lwd_td=4,plot_legend=TRUE,...)
an object of class x12Output-class
, x12Single-class
or spectrum-class
.
a string defining the executable of the editor to use ("sa"
for the Spectrum of the Seasonally Adjusted Series,
"original"
for the Spectrum of the Original Series, "irregular"
for the Spectrum of the Irregular Series
and "residuals"
for the Spectrum of the RegARIMA Residuals).
frequency of the time series (has to be specified for objects of class "spectrum"
only).
label of the x-axis.
label of the y-axis.
plot title.
color of bars.
color of seasonal frequencies.
color of trading day frequencies.
line width of bars.
line width of seasonal frequencies.
line width of trading day frequencies.
logical specifying if a legend should be plotted.
if (FALSE) {
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))
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)
}