Description Usage Arguments Value Author(s)
View source: R/sample-similar-day.R
Takes a vector of dates as inputs and randomly samples a random number of from the residual data frame. Similar dates can be defined by day of the week or working/non-working days.
1 2 | sample_sequence_similar_days(fcst_dates, resid_dates, min_block_length = 6,
max_block_length = 14, date_drift = 7)
|
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 column. Only unique values should be included. |
min_block_length |
integer giving minimum block length in days. |
max_block_length |
integer giving maximum block length in days. |
date_drift |
integer specifying number of days that block start length can differ from current day of year. |
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.