WeekDayDummy-methods {rugarch}R Documentation

function: Create Dummy Day-of-Week Variable

Description

Helper function to create a dummy, day of the week variable given a set of dates.

Usage

WeekDayDummy(Dates, date.format, weekday = "Monday")

Arguments

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.

Value

A numeric vector of 0s and 1s (date-dummy variable)/

Author(s)

Alexios Ghalanos

Examples

data(sp500ret)
Dates=rownames(sp500ret)
# create Monday dummy
monday=WeekDayDummy(Dates, date.format="%Y-%m-%d", weekday = "Monday")

[Package rugarch version 1.0-10 Index]