0% found this document useful (0 votes)
3 views

hw6

The document outlines the process of applying a VAR model to U.S. macroeconomic data, specifically focusing on output and unemployment. It details the steps for data preparation, model selection, estimation, and validation, including tests for stability, residual analysis, and normality. The results indicate a stable relationship between the variables with no significant issues in the residuals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

hw6

The document outlines the process of applying a VAR model to U.S. macroeconomic data, specifically focusing on output and unemployment. It details the steps for data preparation, model selection, estimation, and validation, including tests for stability, residual analysis, and normality. The results indicate a stable relationship between the variables with no significant issues in the residuals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1 Applying a VAR model to macroeconomic data

Initially, our analysis will center on two prominent U.S. time series: data pertaining to
output and unemployment. This information is contained within the file designated as
T7-varBQus.R. To facilitate a rigorous examination, we shall commence by
eradicating any pre-existing variables from the workspace and terminating any active
graphical representations.
We will now employ two R packages, namely vars and tsm, which we previously
installed. These packages furnish functionalities essential for the manipulation of time
series data.
The data is stored in a CSV file. For R to retrieve this information, it is imperative to
modify the provided path to reflect the directory housing your particular CSV file.
Upon completion of this step, we can import the data from the CSV file and instantiate
two time series objects: one identified as "gdp" and the other as "une".

To ascertain the accuracy of our procedures, we can visualize the data graphically.

To investigate the persistence present within the data, we will employ the
autocorrelation function.

The unemployment statistics appear to reveal a temporal trend, which poses a


challenge for analytical purposes. To mitigate this issue, we shall employ the
Dickey-Fuller test to ascertain the presence of a "unit root" within the dataset.

1.1 Model selection and estimation

In order to merge our "gdp" and "une" datasets into a singular entity for examination,
we can simply align them laterally. Subsequently, we will apply statistical criteria to
determine the appropriate number of lags to incorporate.

All information criteria suggest a lag length of 2. This necessitates setting the
autoregressive parameter (p) to 2 during the model estimation process, as illustrated
below.

Our evaluation indicates that the model exhibits stability and the variables appear to
exert mutual influence (historical unemployment impacts output, and historical output
and unemployment affect unemployment).

To assess the model's goodness-of-fit, we will scrutinize the residual errors. We will
utilize the Portmanteau test to ascertain whether these errors are distributed randomly,
as demonstrated below.

A p-value exceeding 5% generally indicates that there are no concerns regarding the
clustering or patterning of residuals (serial correlation). Furthermore, we will conduct
an additional test to assess the presence of unequal variances among the residuals
(heteroscedasticity).

A p-value above 5% implies that there are no issues related to unequal variances in the
residuals (heteroscedasticity). Lastly, we can evaluate whether the residuals
themselves conform to a normal distribution through a normality assessment.

The results indicate that the residuals are likely to be normally distributed. As a
concluding measure, we will employ a CUSUM test to investigate any abrupt changes
in the behavior of the residuals over the temporal dimension (structural breaks).

There are no interruptions in the confidence intervals, signifying a statistically stable


association between the variables over time.

You might also like