intervention.variable: Intervention variable

View source: R/variables.R

intervention.variableR Documentation

Intervention variable

Description

Intervention variable

Usage

intervention.variable(
  frequency,
  start,
  length,
  s,
  starts,
  ends,
  delta = 0,
  seasonaldelta = 0
)

Arguments

frequency

Annual frequency (divisor of 12).

start, length

First date (array with the first year and the first period) (for instance c(1980, 1)) and number of periods of the output variables. Can also be provided with the s argument

s

time series used to get the dates for the trading days variables. If supplied the parameters frequency, start and length are ignored.

starts, ends

characters specifying sequences of starts/ends dates for the intervention variable. Can be characters or integers.

delta

regular differencing order.

seasonaldelta

segular differencing order.

Details

Intervention variables are combinations of any possible sequence of ones and zeros (the sequence of ones being defined by by the parameters starts and ends) and of \frac{1}{(1-B)^d} and \frac{1}{(1-B^s)^D} where B is the backwar operation, s is the frequency of the time series, d and D are the parameters delta and seasonaldelta.

For example, with delta = 0 and seasonaldelta = 0 we get temporary level shifts defined by the parameters starts and ends. With delta = 1 and seasonaldelta = 0 we get the cumulative sum of temporary level shifts.

Examples

intervention.variable(12, c(2000, 1), 60,
    starts = "2001-01-01", ends = "2001-12-01")
intervention.variable(12, c(2000, 1), 60,
    starts = "2001-01-01", ends = "2001-12-01", delta = 1)

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