lp_irf {sovereign}R Documentation

Estimate impulse response functions

Description

Estimate impulse response functions

Usage

lp_irf(lp, CI = c(0.1, 0.9), regime = NULL)

Arguments

lp

LP output

CI

numeric vector: c(lower ci bound, upper ci bound)

regime

string: indicates regime index column of data

Value

long-form data.frame with one row per target-shock-horizon identifier

See Also

LP()

lp_irf()

RLP()

rlp_irf()

Examples



  # simple time series
  AA = c(1:100) + rnorm(100)
  BB = c(1:100) + rnorm(100)
  CC = AA + BB + rnorm(100)
  date = seq.Date(from = as.Date('2000-01-01'), by = 'month', length.out = 100)
  Data = data.frame(date = date, AA, BB, CC)

  # local projection forecasts
  lp =
    sovereign::LP(
      data = Data,
      horizon = c(1:10),
      lag.ic = 'AIC',
      lag.max = 4,
      type =  'both',
      freq = 'month')

  # impulse response function
  irf = sovereign::lp_irf(lp)




[Package sovereign version 1.2.1 Index]