create_holiday: Creates holiday variables to be used in modeling

Description Usage Arguments Value

View source: R/create_holiday.R

Description

Creates holiday variables to be used in modeling

Usage

1
2
3
4
5
6
7
create_holiday(
  data,
  to_weekly = TRUE,
  create_lead_lag = TRUE,
  lead_lag_one = TRUE,
  one_holiday_per_week = FALSE
)

Arguments

data

Data set with date and character vector of holiday names

to_weekly

Should data be converted to weekly data. Defaults to TRUE.

create_lead_lag

Should leads and lags be created

lead_lag_one

TRUE if lead and lag of the dummy are also 1 instead of -0.5 for lag and 0.5 for lead to capture different effect of lead and lag holiday

one_holiday_per_week

If there are two holidays taking place on same week, should only one be select. Default to FALSE since this could change over time.

Value

Returns list with two data set: holidays_for_ml which is for ML algos and holidays_for_clean which will be used when cleaning the data


vidarsumo/sumots documentation built on June 29, 2021, 4:23 a.m.