my_ao {boiwsa} | R Documentation |
Creates a matrix with additive outlier variables. Uses the original data dates and the user specified outlier dates.
my_ao(dates, out.list)
dates |
Vector of dates in a date format |
out.list |
Vector of outlier dates in a date format |
AO matrix with outlier variables
# 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