# NOT RUN {
# feel free to ignore the following line<U+2014>it allows {broom} to supply
# examples without requiring the model-supplying package to be installed.
if (requireNamespace("vars", quietly = TRUE)) {
# load libraries for models and data
library(vars)
# load data
data("Canada", package = "vars")
# fit models
mod <- VAR(Canada, p = 1, type = "both")
# summarize model fit with tidiers
tidy(mod)
glance(mod)
}
# }
Run the code above in your browser using DataLab