pulse.calculator: Generate pulse effect formulae for a given autoregressive...

View source: R/tseffects.R

pulse.calculatorR Documentation

Generate pulse effect formulae for a given autoregressive distributed lag (ADL) model

Description

Generate pulse effect formulae for a given autoregressive distributed lag (ADL) model

Usage

pulse.calculator(x.vrbl, y.vrbl = NULL, limit)

Arguments

x.vrbl

a named vector of the x variables and corresponding lag orders in an ADL model

y.vrbl

a named vector of the (lagged) y variables and corresponding lag orders in an ADL model

limit

an integer for the number of periods (s) to determine the pulse effect (beginning at 0)

Details

pulse.calculator does no calculation. It generates a list of mpoly formulae that contain variable names that represent the pulse effect in each period. The expectation is that these will be evaluated using coefficients from an object containing an ADL model with corresponding variables. Note: mpoly does not allow variable names with a .; variables passed to pulse.calculator should not include this character

Value

a list of limit + 1 mpoly formulae containing the pulse effect formula in each period

Author(s)

Soren Jordan, Garrett N. Vande Kamp, and Reshi Rajan

Examples

# ADL(1,1)
x.lags <- c("x" = 0, "l_1_x" = 1) # lags of x
y.lags <- c("l_1_y" = 1)
s <- 5
pulses <- pulse.calculator(x.vrbl = x.lags, y.vrbl = y.lags, limit = s)
pulses
# Will also handle finite dynamics
x.lags <- c("x" = 0, "l_1_x" = 1) # lags of x
finite.pulses <- pulse.calculator(x.vrbl = x.lags, limit = s)

tseffects documentation built on Feb. 5, 2026, 5:09 p.m.