WeekDayDummy-methods {rugarch} | R Documentation |
Helper function to create a dummy, day of the week variable given a set of dates.
WeekDayDummy(Dates, date.format, weekday = "Monday")
Dates |
A character vector of dates . |
date.format |
The format of the dates e.g. “%Y-%m-%d"” . |
weekday |
Character string indicating day of week. |
A numeric vector of 0s and 1s (date-dummy variable)/
Alexios Ghalanos
data(sp500ret) Dates=rownames(sp500ret) # create Monday dummy monday=WeekDayDummy(Dates, date.format="%Y-%m-%d", weekday = "Monday")