outliers
performs a detection of four types of anomalies (AO, TC, LS
and IO) in a time series described by an ARIMA model. If the dates of the
outliers are unknown, an iterative detection process like that proposed by
Chen and Liu (1993) is conducted.
# S3 method for tfm
outliers(
mdl,
y = NULL,
types = c("AO", "LS", "TC", "IO"),
dates = NULL,
c = 3,
calendar = FALSE,
easter = FALSE,
resid = c("exact", "cond"),
n.ahead = NULL,
p.value = 1,
tc.fix = TRUE,
envir = NULL,
...
)outliers(mdl, ...)
# S3 method for um
outliers(
mdl,
y = NULL,
types = c("AO", "LS", "TC", "IO"),
dates = NULL,
c = 3,
calendar = FALSE,
easter = FALSE,
resid = c("exact", "cond"),
n.ahead = 0,
p.value = 1,
tc.fix = TRUE,
envir = NULL,
...
)
an object of class ts
, optional.
a vector with the initials of the outliers to be detected, c("AO", "LS", "TC", "IO").
a list of dates c(year, season). If dates = NULL
, an
iterative detection process is conducted.
a positive constant to compare the z-ratio of the effect of an
observation and decide whether or not it is an outlier. This argument is
only used when dates = NULL
.
logical; if true, calendar effects are also estimated.
logical; if true, Easter effect is also estimated.
type of residuals (exact or conditional) used to identify outliers.
a positive integer to extend the sample period of the
intervention variables with n.ahead
observations, which could be
necessary to forecast the output.
estimates with a p-value greater than p.value are omitted.
a logical value indicating if the AR coefficient in the transfer function of the TC is estimated or fix.
environment in which the function arguments are evaluated. If NULL the calling environment of this function will be used.
other arguments.
an object of class "tfm
" or a table.
# NOT RUN {
Y <- rsales
um1 <- um(Y, i = list(1, c(1, 12)), ma = list(1, c(1, 12)), bc = TRUE)
outliers(um1)
# }
Run the code above in your browser using DataLab