powered by
CalendarVar creates a set of deterministic variables to capture calendar effects.
CalendarVar
CalendarVar( x, form = c("dif", "td", "td7", "td6", "wd", "wd2", "null"), ref = 0, lom = TRUE, lpyear = TRUE, easter = FALSE, len = 4, easter.mon = FALSE, n.ahead = 0 )
An object of class mts or ts.
mts
ts
an object of class ts used to determine the sample period and frequency.
a character indicated the set of calendar variables: td, td7, td6, wd.
a non-negative integer indicating the reference day.
logical. If TRUE length of the month effect is also estimated.
logical. If TRUE a leap year effect is also estimated.
logical. If TRUE an additional deterministic variable is generated to capture Easter effects.
duration of the Easter, integer.
logical. It is TRUE if Holy Monday is a public holiday.
number of additional observations to extend the sample period.
Bell, W.R. and Hillmer, S.C. (1983) “Modeling time series with calendar variation”, Journal of the American Statistical Society, Vol. 78, pp. 526–534.
Y <- rsales X <- CalendarVar(Y, easter = TRUE)
Run the code above in your browser using DataLab