x12-methods: ~~ Methods for Function 'x12' in Package 'x12' ~~

Description Usage Arguments Methods Value Note Author(s) Source References See Also Examples

Description

~~ Methods for function x12 in package x12 ~~

Usage

1
x12(object,x12Parameter=new("x12Parameter"),x12BaseInfo=new("x12BaseInfo"),...)

Arguments

object

object of class ts, x12Single-class or x12Batch-class

x12Parameter

object of class x12Parameter

x12BaseInfo

object of class x12BaseInfo

...

at the moment only forceRun=FALSE

Methods

signature(object = "ts")
signature(object = "x12Single")
signature(object = "x12Batch")

Value

An S4 object of class x12Output-class if object is of class ts

An S4 object of class x12Single-class if object is of class x12Single-class

An S4 object of class x12Batch-class if object is of class x12Batch-class

Note

Parallelization is implemented for x12Batch objects with help of the package 'parallel'. To process in parallel set the option 'x12.parallel' to an integer value representing the number of cores to use ( options(x12.parallel=2) ). Afterwards all calls to the function 'x12' on an object of class 'x12Batch' will be parallelized (For reseting use options(x12.parallel=NULL) ).

cleanHistory is deprecated and cleanArchive should be used instead.

Author(s)

Alexander Kowarik, Angelika Meraner

Source

https://www.census.gov/srd/www/x13as/

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

summary, plot, x12env, setP, getP, loadP, saveP, prev, cleanArchive, crossVal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
xts <- x12(AirPassengers)
summary(xts)
xs <- x12(new("x12Single",ts=AirPassengers))
summary(xs)

## Not run: 
xb<-x12(new("x12Batch",list(AirPassengers,AirPassengers,AirPassengers)))
summary(xb)

#Create new batch object with 4 time series
xb <- new("x12Batch",list(AirPassengers,AirPassengers,AirPassengers,AirPassengers))

# change the automdl to FALSE in all 4 elements
xb <- setP(xb,list(automdl=FALSE))
#change the arima.model and arima.smodel setting for the first ts object
xb <- setP(xb,list(arima.model=c(1,1,0),arima.smodel=c(1,1,0)),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(1,1,1)),3)
#change the arima.model and arima.smodel setting for the fourth ts object
xb <- setP(xb,list(arima.model=c(1,1,1),arima.smodel=c(1,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)

## End(Not run)

statistikat/x12 documentation built on Sept. 26, 2018, 4:23 p.m.