# NOT RUN {
# 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)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab