x12Batch-class {x12}R Documentation

Class "x12Batch"

Description

Concatenation of multiple x12Single-class objects.

Objects from the Class

Objects can be created by calls of the form new("x12Batch", tsList, tsName, x12BaseInfo).

Slots

x12List:

Object of class "x12List" ~~

x12BaseInfo:

Object of class "x12BaseInfo" ~~

Methods

setP

signature(object = "x12Batch"): ...

getP

signature(object = "x12Batch"): ...

prev

signature(object = "x12Batch"): ...

cleanArchive

signature(object = "x12Batch"): ...

loadP

signature(object = "x12Batch"): ...

saveP

signature(object = "x12Batch"): ...

summary

signature(object = "x12Batch"): ...

x12

signature(object = "x12Batch"): ...

dim

signature(x = "x12Batch"): ...

length

signature(x = "x12Batch"): ...

cleanHistory

signature(object = "x12Batch"): ...

Note

cleanHistory is deprecated and cleanArchive should be used instead.

Author(s)

Alexander Kowarik

References

Alexander Kowarik, Angelika Meraner, Matthias Templ, Daniel Schopfhauser (2014). Seasonal Adjustment with the R Packages x12 and x12GUI. Journal of Statistical Software, 62(2), 1-21. URL http://www.jstatsoft.org/v62/i02/.

See Also

x12, x12Single, x12Parameter, x12List, x12Output, x12BaseInfo, summary, getP, x12work

Examples

## Not run: 
#object containing 4 time series and the corresponding parameters and output
data(AirPassengersX12Batch)
summary(AirPassengersX12Batch)
#summary with oldOutput
summary(AirPassengersX12Batch,oldOutput=10)
#Change the parameter and output of the first series back to the first run
AirPassengersX12Batch <- prev(AirPassengersX12Batch,index=1,n=1)
#summary with oldOutput (--- No valid previous runs. ---)
summary(AirPassengersX12Batch,oldOutput=10)

#Create new batch object with 4 time series
xb <- new("x12Batch",list(AirPassengers,ldeaths,nottem,UKgas),
  c("Air","ldeaths","nottem","UKgas"))
# change outlier.types to "all" in all 4 elements
xb <- setP(xb,list(outlier.types="all"))
#change the arima.model and arima.smodel setting for the first ts object
xb <- setP(xb,list(arima.model=c(0,1,1),arima.smodel=c(0,1,1)),1)
#change the arima.model and arima.smodel setting for the second ts object
xb <- setP(xb,list(arima.model=c(0,1,1),arima.smodel=c(0,1,1)),2)
#change the arima.model and arima.smodel setting for the third ts object
xb <- setP(xb,list(arima.model=c(0,1,1),arima.smodel=c(0,1,1)),3)
#change the arima.model and arima.smodel setting for the fourth ts object
xb <- setP(xb,list(arima.model=c(0,1,1),arima.smodel=c(0,1,1)),4)
#run x12 on all series
xb <- x12(xb)
summary(xb)
#Set automdl=TRUE for the first ts
xb <- setP(xb,list(automdl=TRUE),1)
#rerun x12 on all series (the binaries will only run on the first one)
xb <- x12(xb)
#summary with oldOutput
summary(xb,oldOutput=10)
#Change the parameter and output of the first series back to the first run
xb <- prev(xb,index=1,n=1)
#summary with oldOutput (--- No valid previous runs. ---)
summary(xb,oldOutput=10)

#Create new batch object by combining objects of class x12Single
s1 <- new("x12Single",ts=AirPassengers,tsName="air")
s1 <- setP(s1,list(estimate=TRUE,regression.variables="AO1950.1",outlier.types="all",
  outlier.critical=list(LS=3.5,TC=2.5)))
s2 <- new("x12Single",ts=UKgas,tsName="UKgas")
s2 <- setP(s2,list(slidingspans=TRUE,history=TRUE,
  history.estimates=c("sadj","sadjchng","trend","trendchng","seasonal","aic"),
  history.sadjlags=c(1,2),automdl=TRUE))
b <- new("x12Batch",list(s1,s2))
b <- x12(b)

## End(Not run)

[Package x12 version 1.10.3 Index]