Question: # Assignment 1 2 library ( fpp 3 ) # 1 2 . 2 Fit VAR model with AICc and BIC for Consumption, Income, and

# Assignment 12
library(fpp3)
# 12.2 Fit VAR model with AICc and BIC for Consumption, Income, and Savings
fit <- us_change %>%
model(
aicc = VAR(vars(Consumption, Income, Savings)),
bic = VAR(vars(Consumption, Income, Savings), ic = "bic")
)
fit
glance(fit)
# 12.3 ACF of the residuals
fit %>%
augment()%>%
ACF(.innov)%>%
autoplot()
# VAR(5) forecasts using the model suggested by AICc
forecast_plots <- fit %>%
select(aicc)%>%
forecast(h ="2 years")%>%
filter(year(Quarter)>2000)%>%
autoplot(us_change %>% filter(year(Quarter)>2000))
forecast_plots
if (!requireNamespace("broom", quietly = TRUE)){
install.packages("broom")
}
4.Use the model suggested by the AICc criterion to forecast the three variables. Choose year(Quarter)>2000.
Paste here: the forecast plots for the three variables.
5.Run report(fit) for the AICc suggested model. The output will show an estimated equation for each of the variables in the VAR model. Given the estimated coefficients, write out the VAR model similar to equations 12.1 and 12.2. Do not include the error terms.
Paste here: the report(fit) output.
6.Compute the forecast values for consumption, income, and savings.
Paste here: The fable with the forecast values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!