data("climateIndices", package = "exdqlm")
T <- 150
bt_dates <- seq(as.Date("1987-01-01"), by = "month", length.out = T)
idx <- match(bt_dates, climateIndices$date)
X <- scale(climateIndices[idx, c("noi", "amo")])
# Single regressor (T x 1)
reg1 = regMod(X[, "noi"])
# Multiple regressors (T x n)
reg2 = regMod(X)
# Combine with trend/seasonal components
trend.comp = polytrendMod(order = 3, m0 = rep(0,3), C0 = diag(3))
seas.comp = seasMod(p = 12, h = 1, C0 = diag(1, 2))
base.mod = trend.comp + seas.comp
model.std = base.mod + reg2
Run the code above in your browser using DataLab