| simple_td | R Documentation |
Constructs a weekly trading-day regressor by counting the number of full
working days within each weekly period and centering the resulting series by
subtracting its sample mean. Daily working-day information is supplied via
df.td and mapped to the weekly dates provided in dates.
simple_td(dates, df.td)
dates |
A vector of class |
df.td |
A data frame containing daily working-day information with two columns:
|
A data frame with two columns:
Weekly dates corresponding to dates.
Centered weekly count of full working days.
The returned object can be merged into a matrix of holiday/trading-day
regressors supplied to boiwsa() via the H argument.
library(dplyr)
data(dates_il)
data(gasoline.data)
dates_il%>%
dplyr::select(DATE_VALUE,ISR_WORKING_DAY_PART)%>%
`colnames<-`(c("date","WORKING_DAY_PART"))%>%
dplyr::mutate(date=as.Date(date))->df.td
td=simple_td(dates = gasoline.data$date,df.td = df.td)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.