| x13 | R Documentation |
Seasonal Adjustment with X13-ARIMA
x13(
ts,
spec = c("rsa4", "rsa0", "rsa1", "rsa2c", "rsa3", "rsa5c"),
context = NULL,
userdefined = NULL
)
x13_fast(
ts,
spec = c("rsa4", "rsa0", "rsa1", "rsa2c", "rsa3", "rsa5c"),
context = NULL,
userdefined = NULL
)
jx13(
ts,
spec = c("rsa4", "rsa0", "rsa1", "rsa2c", "rsa3", "rsa5c"),
context = NULL,
userdefined = NULL
)
ts |
an univariate time series. |
spec |
the model specification. Can be either the name of a predefined specification or a user-defined specification. |
context |
list of external regressors (calendar or other) to be used for estimation |
userdefined |
a vector containing additional output variables
(see |
the x13() function returns a list with the results, the estimation
specification and the result specification, while x13_fast() is a faster
function that only returns the results. The jx13() functions only returns
results in a java object which will allow to customize outputs in other
packages (use rjd3toolkit::dictionary() to get the list of variables and
rjd3toolkit::result() to get a specific variable). In the estimation
functions x13() and x13_fast() you can directly use a specification name
(string). If you want to customize a specification you have to create a
specification object first.
library("rjd3toolkit")
y <- rjd3toolkit::ABS$X0.2.09.10.M
x13_fast(y, "rsa3")
x13(y, "rsa5c")
regarima_fast(y, "rg0")
regarima(y, "rg3")
sp <- x13_spec("rsa5c")
sp <- add_outlier(sp,
type = c("AO"), c("2015-01-01", "2010-01-01")
)
sp <- set_transform(
set_tradingdays(
set_easter(sp, enabled = FALSE),
option = "workingdays"
),
fun = "None"
)
x13(y, spec = sp)
sp <- set_x11(sp,
henderson.filter = 13
)
x13_fast(y, spec = sp)
j <- jx13(y, spec = sp)
class(j)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.