Sets up UC general univariate models
UCsetup(
y,
u = NULL,
model = "?/none/?/?",
h = NA,
outlier = NA,
tTest = FALSE,
criterion = "aic",
periods = NA,
verbose = FALSE,
stepwise = FALSE,
p0 = NA,
cLlik = TRUE,
arma = TRUE
)
a time series to forecast (it may be either a numerical vector or
a time series object). This is the only input required. If a vector, the additional
input periods
should be supplied compulsorily (see below).
a matrix of input time series. If
the output wanted to be forecast, matrix u
should contain future values for inputs.
the model to estimate. It is a single string indicating the type of model for each component. It allows two formats "trend/seasonal/irregular" or "trend/cycle/seasonal/irregular". The possibilities available for each component are:
Trend: ? / none / rw / irw / llt / dt;
Seasonal: ? / none / equal / different;
Irregular: ? / none / arma(0, 0) / arma(p, q) - with p and q integer positive orders;
Cycles: ? / none / combination of positive or negative numbers.
Positive numbers fix the period of the cycle while negative values estimate the period taking as initial condition the absolute value of the period supplied. Several cycles with positive or negative values are possible and if a question mark is included, the model test for the existence of the cycles specified (check the examples below).
forecast horizon. If the model includes inputs h is not used, the lenght of u is used instead.
critical level of outlier tests. If NA it does not carry out any outlier detection (default). A negative value indicates critical minimum t test for one run of outlier detection after identification. A positive value indicates the critical minium t test for outlier detection in any model during identification.
augmented Dickey Fuller test for unit roots (TRUE / FALSE). The number of models to search for is reduced, depending on the result of this test.
information criterion for identification ("aic", "bic" or "aicc").
vector of fundamental period and harmonics.
intermediate results shown about progress of estimation (TRUE / FALSE).
stepwise identification procedure (TRUE / FALSE).
initial condition for parameter estimates.
reserved input
check for arma models for irregular components (TRUE / FALSE).
An object of class UComp
. See UCmodel
.
Standard methods applicable to UComp objects are print, summary, plot,
fitted, residuals, logLik, AIC, BIC, coef, predict, tsdiag.
See help of UC
.
UC
, UCmodel
, UCvalidate
, UCfilter
, UCsmooth
,
UCdisturb
, UCcomponents
,
UChp
# NOT RUN {
y <- log(AirPassengers)
m1 <- UCsetup(y)
m1 <- UCsetup(y, model = "llt/equal/arma(0,0)")
m1 <- UCsetup(y, outlier = 4)
# }
Run the code above in your browser using DataLab