gen_air_components: Generate signal extraction components

View source: R/gen_air_components.r

gen_air_componentsR Documentation

Generate signal extraction components

Description

Generates components from the decomposition of the fractional airline model R routines, partioning regression effects to different components as in X-13ARIMA-SEATS

Usage

gen_air_components(
  this_est,
  this_decomp,
  this_xtype,
  this_x = NULL,
  this_log = TRUE,
  this_stde = FALSE,
  tc2trend = FALSE,
  remove_user = FALSE
)

Arguments

this_est

A list object generated by the estimation procedure of the fractional airline model

this_decomp

A list object generated by the decomposition procedure of the fractional airline model

this_xtype

Character vector; Type of regressor used for including regression effects into components ('hol' for holiday, 'ao' for point outliers, 'ls' for level change outliers).

this_x

Character vector; regression. Default: use the regression matrix in this_est$model$X.

this_log

Logical scalar; set to TRUE if the log transformation is used in the decomposition, FALSE otherwise. Default: TRUE

this_stde

Logical scalar; component standard error included in this_decomp. Default: FALSE.

tc2trend

Logical scalar; TC outliers included in trend component if TRUE. Default: FALSE, TC outliers included in irregular.

remove_user

Logical scalar; remove user-defined regression factors from seasonally adjusted series if TRUE. Default: FALSE, user defined regression factors included in seasonally adjusted series.

Value

List of components from the fractional airline decomposition, partioning regression effects to different components as in X-13ARIMA-SEATS

Examples

ic_est <-
   rjd3highfreq::fractionalAirlineEstimation(ic_obs, periods=c(365.25/7),
                                      x=ic_default_matrix)
ic_decomp <-
   rjd3highfreq::fractionalAirlineDecomposition(ic_est$model$linearized,
                                         365.25/7, stde = TRUE)
ic_xtype <- c(rep('hol', 13), rep('ao', 40))
ic_comp <- 
   gen_air_components(ic_est, ic_decomp,
                      this_xtype = ic_xtype,
                      this_log = FALSE, 
                      this_stde = TRUE)
ic_comp_tis <- lapply(ic_comp, function(x)
   try(tis::tis(x, start = ic_start, tif = 'wsaturday')))

bcmonsell/airutilities documentation built on May 16, 2022, 3:23 p.m.