# NOT RUN {
# simple time series
A = c(1:100) + rnorm(100)
B = c(1:100) + rnorm(100)
C = c(1:100) + rnorm(100)
date = seq.Date(from = as.Date('2000-01-01'), by = 'month', length.out = 100)
Data = data.frame(date = date, A, B, C)
# run forecast_univariate
forecast.multi =
forecast_multivariate(
Data = Data,
target = 'A',
forecast.dates = tail(Data$date,5),
method = c('ols','var'),
horizon = 1,
# information set
rolling.window = NA,
freq = 'month',
# data prep
lag.n = 4,
outlier.clean = TRUE,
impute.missing = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab