Learn R Programming

boiwsa (version 1.1.4)

my_rosh: Internal function for a specific application

Description

Creates a dummy moving holiday variable for the weekly number of initial registrations at the Employment Service in Israel.

Usage

my_rosh(dates, holiday.dates, start = -11, end = 12)

Value

rosh holiday variable

Arguments

dates

a vector of class "Date", containing the data dates

holiday.dates

a vector of class "Date", containing the occurrences of the holiday. It can be generated with as.Date().

start

-11 for rosh, 3 for pesach

end

12 for rosh, -1 for pesach

Examples

Run this code

# Creating moving holiday dummy variable for Israeli Rosh Hashanah
data(gasoline.data)
data(holiday_dates_il) # dates of Israeli Rosh Hashanah and Pesach
movehol=my_rosh(gasoline.data$date,holiday.dates = holiday_dates_il$rosh)

Run the code above in your browser using DataLab