CalendarVar: Calendar variables

View source: R/detvar.R

CalendarVarR Documentation

Calendar variables

Description

CalendarVar creates a set of deterministic variables to capture calendar effects.

Usage

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
)

Arguments

x

an object of class ts used to determine the sample period and frequency.

form

a character indicated the set of calendar variables: td, td7, td6, wd.

ref

a non-negative integer indicating the reference day.

lom

logical. If TRUE length of the month effect is also estimated.

lpyear

logical. If TRUE a leap year effect is also estimated.

easter

logical. If TRUE an additional deterministic variable is generated to capture Easter effects.

len

duration of the Easter, integer.

easter.mon

logical. It is TRUE if Holy Monday is a public holiday.

n.ahead

number of additional observations to extend the sample period.

Value

An object of class mts or ts.

References

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.

Examples


Y <- rsales
X <- CalendarVar(Y, easter = TRUE)


tfarima documentation built on May 20, 2022, 5:06 p.m.