Description Usage Arguments Value See Also Examples
Estimate impulse response functions
1 |
lp |
LP output |
CI |
numeric vector: c(lower ci bound, upper ci bound) |
regime |
string: indicates regime index column of data |
long-form data.frame with one row per target-shock-horizon identifier
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.