View source: R/gen_tc_outlier_matrix.r
gen_tc_outlier_matrix | R Documentation |
Generates a regression matrix of TC (temporary change) outliers to be included in weekly modeling routines
gen_tc_outlier_matrix( outlier_dates, this_week, this_year, forecast = 0, air_name = TRUE, this_freq = NULL, tc_alpha = NULL, return_xts = FALSE )
outlier_dates |
Integer matrix - matrix of dates for TC outliers |
this_week |
Numeric vector; Week of the year for each observation. |
this_year |
Numeric vector; Year of each observation. |
forecast |
Numeric scalar; Number of forecasts. Default: 0. |
air_name |
Logical scalar; If TRUE, names are formatted as they are in the fractional airline routine; otherwise format them as in movereg. Default: TRUE |
this_freq |
Numeric scalar; frequency of time series. Default: 365.25/7, for a weekly series |
tc_alpha |
Numeric scalar; Rate of decay for the TC outlier.
Default: will be computed as in |
return_xts |
Logical scalar; return matrix as an |
Generate matrix of temporary change outlier regressors, with column names that describe the individual regressors
ic_tc_dates <- matrix(c(13, 2020), ncol=2, byrow=TRUE) ic_tc_matrix <- gen_level_outlier_matrix(ic_tc_dates, ic_week, ic_year, 0, return_xts = FALSE) cc_tc_dates <- matrix(c(13, 2020), ncol=2, byrow=TRUE) cc_tc_matrix_xts <- gen_level_outlier_matrix(cc_tc_dates, cc_week_xts, cc_year_xts, 0, return_xts = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.