outlierLasso function

Outliers LASSO

Outliers LASSO

Use LASSO estimation to identify outliers in a set of time series by creating dummy variables for every time point.

outlierLasso( zt, p = 12, crit = 3.5, family = "gaussian", standardize = TRUE, alpha = 1, jend = 3 )

Arguments

  • zt: T by 1 vector of an observed scalar time series without missing values.
  • p: Seasonal period. Default value is 12.
  • crit: Criterion. Default is 3.5.
  • family: Response type. See the glmnet command in R. Possible types are "gaussian", "binomial", "poisson", "multinomial", "cox", "mgaussian". Default is "gaussian".
  • standardize: Logical flag for zt variable standardization. See the glmnet command in R. Default is TRUE.
  • alpha: Elasticnet mixing parameter, with 0α10 \leq \alpha \leq 1. See the glmnet command in R. Default value is 1.
  • jend: Number of first and last observations assumed to not be level shift outliers. Default value is 3.

Returns

A list containing:

  • nAO - Number of additive outliers.
  • nLS - Number of level shifts.

Examples

data(TaiwanAirBox032017) output <- outlierLasso(TaiwanAirBox032017[1:100,1])
  • Maintainer: Antonio Elias
  • License: GPL-3
  • Last published: 2022-04-27

Useful links