outlierLasso | R Documentation |
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 )
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 ≤q α ≤q 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. |
A list containing:
nAO - Number of additive outliers.
nLS - Number of level shifts.
data(TaiwanAirBox032017) output <- outlierLasso(TaiwanAirBox032017[1:100,1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.