my_ao function

Create additive outlier variables

Create additive outlier variables

Creates a matrix with additive outlier variables. Uses the original data dates and the user specified outlier dates.

my_ao(dates, out.list)

Arguments

  • dates: Vector of dates in a date format
  • out.list: Vector of outlier dates in a date format

Returns

AO matrix with outlier variables

Examples

# create a sequence of dates dates=seq.Date(from=as.Date("2023-01-02"),by="weeks",length.out = 100) # create a vector of outlier dates my_ao_dates=as.Date(c("2023-01-02","2023-01-03")) # create a matrix of AO variables my_ao(dates = dates,out.list = my_ao_dates) # as you can see there is only one column corresponding to 2023-01-02, # the second date is ignored because it is not present in the dates vector
  • Maintainer: Tim Ginker
  • License: MIT + file LICENSE
  • Last published: 2025-02-05