set_tradingdays: Set Trading-Days Specification

View source: R/regarima_spec.R

set_tradingdaysR Documentation

Set Trading-Days Specification

Description

Set Trading-Days Specification

Usage

set_tradingdays(
  x,
  option = c(NA, "TradingDays", "WorkingDays", "TD3", "TD3c", "TD4", "None",
    "UserDefined"),
  uservariable = NA,
  stocktd = NA,
  test = c(NA, "None", "Remove", "Add", "Separate_T", "Joint_F"),
  autoadjust = NA,
  coef = NA,
  coef.type = c(NA, "Fixed", "Estimated"),
  automatic = c(NA, "Unused", "FTest", "WaldTest"),
  pftd = NA,
  leapyear = c(NA, "LeapYear", "LengthOfPeriod", "None"),
  leapyear.coef = NA,
  leapyear.coef.type = c(NA, "Fixed", "Estimated")
)

Arguments

x

the specification.

option

to specify the set of trading days regression variables: "TradingDays" = six day-of-the-week regression variables; "WorkingDays" = one working/non-working day contrast variable; "TD3" = weeks, Saturdays, Sundays; "TD3c" = weeks, Fridays+Saturdays, Sundays; "TD4" = weeks, Fridays, Saturdays, Sundays; "None" = no correction for trading days and working days effects; "UserDefined" = userdefined trading days regressors.

uservariable

a vector of characters to specify the name of user-defined calendar regressors. When specified, automatically set option = "UserDefined".

stocktd

a numeric indicating the day of the month when inventories and other stock are reported (to denote the last day of the month, set the variable to 31). When specified, automatically set option = "None".

test

defines the pre-tests for the significance of the trading day regression variables based on the AICC statistics: "None" = the trading day variables are not pre-tested and are included in the model;

(REGARIMA/X-13 specific)

"Add" = the trading day variables are not included in the initial regression model but can be added to the RegARIMA model after the test; "Remove" = the trading day variables belong to the initial regression model but can be removed from the RegARIMA model after the test;

(TRAMO specific)

"Separate_T" = a t-test is applied to each trading day variable separately and the trading day variables are included in the RegArima model if at least one t-statistic is greater than 2.6 or if two t-statistics are greater than 2.0 (in absolute terms); "Joint_F" = a joint F-test of significance of all the trading day variables. The trading day effect is significant if the F statistic is greater than 0.95.

autoadjust

a logical indicating if the program corrects automatically for the leap year effect. It is available when the transformation function is set to Auto.

coef

vector of coefficients for the tranding-days regressors.

coef.type, leapyear.coef.type

vector defining if the coefficients are fixed or estimated.

automatic

(TRAMO SPECIFIC) defines whether the calendar effects should be added to the model manually ("Unused") or automatically. During the automatic selection, the choice of the number of calendar variables can be based on the F-Test ("FTest") or the Wald Test ("WaldTest"); the model with higher F value is chosen, provided that it is higher than pftd).

pftd

(TRAMO SPECIFIC) numeric. The p-value used in the test specified by the automatic parameter (tradingdays.mauto) to assess the significance of the pre-tested calendar effects variables and whether they should be included in the RegArima model.

leapyear

a character to specify whether or not to include the leap-year effect in the model: "LeapYear" = leap year effect; "LengthOfPeriod" = length of period (REGARIMA/X-13 specific), "None" = no effect included.

leapyear.coef

coefficient of the leapyear regressor.


palatej/rjd3modelling documentation built on Jan. 3, 2023, 10:19 p.m.