Estimate a VAR(4) model of consumer price index (CPI), the unemployment rate, and real gross domestic product (GDP). Include a linear regression component containing the current quarter and the last four quarters of government consumption expenditures and investment (GCE).
Load the Data_USEconModel
data set. Compute the real GDP.
Plot all variables on separate plots.
Stabilize the CPI, GDP, and GCE series by converting each to a series of growth rates. Synchronize the unemployment rate series with the others by removing its first observation.
Expand the GCE rate series to a matrix that includes its current value and up through four lagged values. Remove the GCE
variable from Data
.
Create a default VAR(4) model using the shorthand syntax. You do not have to specify the regression component when creating the model.
Estimate the model using the entire sample. Specify the GCE rate matrix as data for the regression component. Extract standard errors and the loglikelihood value.
Display the regression coefficient matrix.
ans = 3×5
0.0777 -0.0892 -0.0685 -0.0181 0.0330
0.1450 -0.0304 0.0579 -0.0559 0.0185
-2.8138 -0.1636 0.3905 1.1799 -2.3328
EstMdl.Beta
is a 3-by-5 matrix. Rows correspond to response series, and columns correspond to predictors.
Display the matrix of standard errors corresponding to the coefficient estimates.
ans = 3×5
0.0250 0.0272 0.0275 0.0274 0.0243
0.0368 0.0401 0.0405 0.0403 0.0358
1.4552 1.5841 1.6028 1.5918 1.4145
EstSE.Beta
is commensurate with EstMdl.Beta
.
Display the loglikelihood value.