lp.variable: Leap Year regressor

View source: R/variables.R

lp.variableR Documentation

Leap Year regressor

Description

Leap Year regressor

Usage

lp.variable(
  frequency,
  start,
  length,
  s,
  type = c("LeapYear", "LengthOfPeriod")
)

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.

type

the modelisation of the leap year effect: as a contrast variable (type = "LeapYear", default) or by a length-of-month (or length-of-quarter; type = "LengthOfPeriod").

Examples

# Leap years occurs on 2000, 2004, 2008 and 2012
lp.variable(4, start = c(2000, 1), length = 4*13)

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