calendar.tfm | R Documentation |
calendar
extends the ARIMA model um
by including a set of
deterministic variables to capture the calendar variation in a monthly time
series. Two equivalent representations are available: (i) D0, D1, ..., D6,
(ii) L, D1-D0, ..., D6-D0 where D0, D2, ..., D6 are deterministic variables
representing the number of Sundays, Mondays, ..., Saturdays, L = D0 + D1 + ...
+ D6 is the of the month. Alternatively, the Leap Year indicator (LPY) can be
included instead of L. The seven trading days can also be compacted into two
variables: week days and weekends. Optionally, a deterministic variable to
estimate the Easter effect can also be included, see "easter
".
## S3 method for class 'tfm' calendar( mdl, y = NULL, form = c("dif", "td", "td7", "td6", "wd"), ref = 0, lom = TRUE, lpyear = TRUE, easter = FALSE, len = 4, easter.mon = FALSE, n.ahead = 0, p.value = 1, envir = NULL, ... ) calendar(mdl, ...) ## S3 method for class 'um' calendar( mdl, y = NULL, form = c("dif", "td", "td7", "td6", "wd"), ref = 0, lom = TRUE, lpyear = TRUE, easter = FALSE, len = 4, easter.mon = FALSE, n.ahead = 0, p.value = 1, envir = NULL, ... )
mdl |
an object of class |
y |
a time series. |
form |
representation for calendar effects: (1) |
ref |
a integer indicating the the reference day. By default, ref = 0. |
lom, lpyear |
a logical value indicating whether or not to include the lom/lead year indicator. |
easter |
logical. If |
len |
the length of the Easter, integer. |
easter.mon |
logical. TRUE indicates that Easter Monday is a public holiday. |
n.ahead |
a positive integer to extend the sample period of the
deterministic variables with |
p.value |
estimates with a p-value greater than p.value are omitted. |
envir |
environment in which the function arguments are evaluated. If NULL the calling environment of this function will be used. |
... |
other arguments. |
An object of class "tfm
".
W. R. Bell & S. C. Hillmer (1983) Modeling Time Series with Calendar Variation, Journal of the American Statistical Association, 78:383, 526-534, DOI: 10.1080/01621459.1983.10478005
Y <- tfarima::rsales um1 <- um(Y, i = list(1, c(1, 12)), ma = list(1, c(1, 12)), bc = TRUE) tfm1 <- calendar(um1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.