Learn R Programming

tfarima (version 0.1.1)

outliers.tfm: Outliers detection at known/unknown dates

Description

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.

Usage

# S3 method for tfm
outliers(
  mdl,
  y = NULL,
  dates = NULL,
  c = 3,
  calendar = FALSE,
  easter = FALSE,
  n.ahead = NULL,
  p.value = 1,
  ...
)

outliers(mdl, ...)

# S3 method for um outliers( mdl, z = NULL, dates = NULL, c = 3, calendar = FALSE, easter = FALSE, n.ahead = 0, p.value = 1, ... )

Arguments

mdl

an object of class um or tfm.

y

an object of class ts

dates

a list of dates c(year, season). If dates = NULL, an iterative detection process is conducted.

c

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.

calendar

logical; if true, calendar effects are also estimated.

easter

logical; if true, Easter effect is also estimated.

n.ahead

a positive integer to extend the sample period of the intervation variables with n.ahead observations, which could be necessary to forecast the output.

p.value

estimates with a p-value greater than p.value are omitted.

...

additional arguments.

z

a time series.

Value

an object of class "tfm" or a table.

Examples

Run this code
# 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