sample_similar_day: Sample similar days

Description Usage Arguments Details Value Author(s)

View source: R/sample-similar-day.R

Description

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.

Usage

1
sample_similar_day(fcst_dates, resid_dates)

Arguments

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

Details

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)

Value

The forecast data frame with a new residuals column.

Author(s)

Cameron Roach


camroach87/gefcom2017 documentation built on March 21, 2020, 11:46 p.m.