Description Usage Arguments Details Value Author(s)
View source: R/sample-similar-day.R
Takes a vector of dates as inputs and randomly samples another similar date from the residual data frame. Similar dates can be defined by day of the week or working/non-working days.
1 | sample_similar_day(fcst_dates, resid_dates)
|
fcst_dates |
vector containing forecasts dates. These are the dates we wish to find similar dates for. |
resid_dates |
data frame of residual date info. Must contain Date and Holiday_flag columns. Only unique values should be included |
TODO: remove DST days from potential sample candidates.
TODO: maybe include a window so that samples come from same time of year (i.e. within a few months)
The forecast data frame with a new residuals column.
Cameron Roach
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.