show.impulse.response: Compute and plot the impulse response function

View source: R/show.impulse.response.R

show.impulse.responseR Documentation

Compute and plot the impulse response function

Description

Computes and plots the coefficients of the impulse response function an ARMA model or a transfer function model (using the Box-Jenkins convention for the sign of the MA coefficients).

Usage

show.impulse.response(
  denominator = numeric(),
  numerator = numeric(),
  delay = 0,
  lag.max = 20,
  y.axis = FALSE,
  type = "transfer"
)

Arguments

denominator

Vector of denominator or autoregressive (AR) coefficients (default is none).

numerator

Vector of numerator or moving average (MA) coefficients (default is none).

delay

in the transfer function model. Default is 0.

lag.max

number of coefficients to compute. Default is 20.

y.axis

logical variable indicating whether the y axis is displayed. Default is FALSE.

type

should be either transfer or arma. Default is transfer.

Value

A vector of lag.max coefficients is returned invisibly.

See Also

psi.weights

Examples

show.impulse.response(numerator=c(1.0), delay=2)
show.impulse.response(numerator=c(1.0, -1.3), delay=2)
show.impulse.response(numerator=c(1.0, -1.3, -1.65), delay=2)
show.impulse.response(numerator=c(0.5, -1.05, -1.52, -0.762, -0.381, -0.191,
               -0.0953, -0.0477, -0.0238, -0.01191), delay=2)
show.impulse.response(numerator=c(0.5, -0.8, -1.0),
               denominator=0.5, delay=2) 
show.impulse.response(numerator=c(.1,-.5), den = c(1.0, -0.55))


wqmeeker/RTseries documentation built on Dec. 31, 2022, 10 a.m.