x12(tso,period=frequency(tso),span=NULL,modelspan=NULL,
decimals=2,transform="auto",
arima=NULL,sarima=NULL,
automdl=FALSE,acceptdefault=FALSE,balanced=TRUE,
maxorder=c(3,2),maxdiff=c(1,1),
regvariables=NULL,reguser=NULL,regfile=NULL,usertype=NULL,centeruser=NULL,regfilestart=NULL,#regfileformat=NULL,
tblnames=NULL,Rtblnames=NULL,addLines=NULL,
x12path=NULL,x13path=NULL,use="x12",
seats=FALSE, seatsparameter=NULL,
sigmalim=c(1.5,2.5),outlier=NULL,critical=NULL,outlier_span=NULL,outlier_method=NULL,
file="Rout",forecast_years=NULL,backcast_years=NULL,forecast_conf=0.95,estimate=FALSE,
estOutofsample=TRUE,slidingspans=FALSE,aictest=NULL,
onlytd=FALSE,sfshort=FALSE,samode=NULL,seasonalma=NULL,trendma=NULL,
x11appendfcst=TRUE,x11appendbcst=FALSE,x11calendarsigma=NULL,x11excludefcst=TRUE,x11final="user",
x11regress=FALSE,keep_x12out=FALSE,showWarnings=FALSE)c(start year, start seasonal period, end year, end seasonaspan."auto", "log", "none").TRUE/FALSE for activating auto modeling.automdl defining whether the default model should be chosen if the Ljung-Box Q statistic
for its model residuals is acceptable.automdl defining whether the automatic model procedure will tend towards balanced
models. TRUE yields the same preference as the TRAMO program.automdl.automdl.reguser variables."seasonal", "td", "lpyear", "user", ...).
By specifying a chara"mean", "seasonal").
Default is no modification of the respective user-defined regressors.reguser variables, specified as a vector of two integers in the format c(year, seasonal period).list(list("spec1","line","line"),list("spec2","line","line","line"),...)
specifying new lines that should be added to the spc file.
The first element of each list is a character defining the respectid:\x12a\x12a.exe.d:\x13\x13.exe."x12" or "x13", at the moment only "x12" is tested properly.TRUE/FALSE for activating SEATS, at the moment SEATS is not properly implemented."AO", "LS", "TC", "all").AO,LS and TC)
where each list element s"addone", "addall").
If not specified,"addone" is used by default.Rout.*.TRUE, the term "estimate" will be added to the spc file.TRUE, slidingspans will be enabled.TRUE, x11 will only be used to estimate trend and to adjust according to trading days.TRUE, the arguments of the seasonalma filter will be used wherever possible.
If FALSE, a stable seasonal filter will"mult", "add", "pseudoadd", "logadd").c("snxm","snxm", ...)
defining which seasonal nxm moving average(s) should be used for which calendar months or quarters
to estimate the seasonal factors.
If only one ma is specified, the"all", "signif", "select" or no specification)."AO", "LS", "TC", "user", "none").TRUE, x11Regression will be performed (using the regression commands above).TRUE, the output files generated by x12 are stored in the folder "gra" in
the output directory and are not deleted at the end of a successful run.x12 returns an object of class "x12".
The function summary is used to print a summary of the diagnostics results.
An object of class "x12" is a list containing at least the following components:x11regress, transform, samode, seasonalma, trendma, arimamdl, automdl, regmdl, nout, nautoout,
nalmostout, almostoutlier, crit, outlier, userdefined, autooutlier, peaks.seas, peaks.td, id.seas,
id.rsdseas, spcrsd, spcori, spcsa, spcirr, q, q2, nmfail, loglikelihood, aic, aicc, bic, hq, aape,
autotransform, ifout, res.acf, res.pacf, res.acf2,...X12,
ts,
summary.x12,
plot.x12,
X12-methods### Examples
data(AirPassengers)
x12out <- x12(AirPassengers,x12path="d:/x12/x12a.exe",transform="auto",
arima=c(0,1,1),sarima=c(0,1,1),regvariables="lpyear",
sigmalim=c(2.0,3.0),outlier="all",critical=list(LS=3.5,TC=3),
seasonalma="s3x3")
summary(x12out)Run the code above in your browser using DataLab