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 datesdates=seq.Date(from=as.Date("2023-01-02"),by="weeks",length.out =100)# create a vector of outlier datesmy_ao_dates=as.Date(c("2023-01-02","2023-01-03"))# create a matrix of AO variablesmy_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