Description Usage Arguments Details Value References See Also Examples

These functions create regressor variables to be used included in the regression where tests for presence will be applied.

1 2 | ```
outliers.regressors(pars, mo, n, weights = TRUE,
delta = 0.7, freq = 12, n.start = 50)
``` |

`pars` |
a list containing the parameters of the model.
See details section in |

`mo` |
a data frame defining the type, location and weight of the outliers to be created. |

`n` |
a numeric. The length of the variable that will contain the outlier. |

`weights` |
logical. If |

`delta` |
a numeric. Parameter of the temporary change type of outlier. |

`freq` |
a numeric. The periodicity of the data.
Used only for the seasonal level shift, |

`n.start` |
a numeric. The number of warming observations added to the
input passed to the Kalman filter. Only for |

The variables returned by these functions are the regressors that take part in
the second equation defined in `locate.outliers`

,
(equation (20) in Chen-Liu (1993), equation (3) in the documentat
attached to the package).

Regressions are not actually run since the *t*-statistics
can be obtained more conveniently as indicated in equation (14) in Chen-Liu (1993).
These variables are used in function `locate.outliers.iloop`

to
adjust the residuals at each iteration.

The function `outliers`

can be used to easily create the input
argument `mo`

.

A matrix containing the regressors by columms.

Chen, C. and Liu, Lon-Mu (1993).
‘Joint Estimation of Model Parameters and Outlier Effects in Time Series’.
*Journal of the American Statistical Association*,
**88**(421), pp. 284-297.

Kaiser, R., and Maravall, A. (1999).
*Seasonal Outliers in Time Series*.
Banco de Espa<c3><b1>a, Servicio de Estudios. Working paper number 9915.
http://www.bde.es/f/webbde/SES/Secciones/Publicaciones/PublicacionesSeriadas/DocumentosTrabajo/99/Fic/dt9915e.pdf

`locate.outliers`

, `outliers`

,
`outliers.tstatistics`

, `tso`

.

1 2 3 4 5 6 7 8 9 10 11 | ```
# regression of the residuals from the ARIMA model
# on the corresponding regressors for three additive outliers
# at the 5% level, the first AO is not significant, the others are significant
data("hicp")
y <- log(hicp[["011600"]])
fit <- arima(y, order = c(1, 1, 0), seasonal = list(order = c(2, 0, 2)))
resid <- residuals(fit)
pars <- coefs2poly(fit)
mo <- outliers(rep("AO", 3), c(10, 79, 224))
xreg <- outliers.regressors(pars, mo, length(y))
summary(lm(residuals(fit) ~ 0 + xreg))
``` |

tsoutliers documentation built on May 29, 2017, 8:07 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.