ECON 112 UCSD Economics Data Analysis Worksheet

Description

The country use for this assignment is Belgium and you can find data form this website https://fred.stlouisfed.org.Please use R studio to compete this assignment.Please also attach the R file that you use for this assignment.

6 attachmentsSlide 1 of 6attachment_1attachment_1attachment_2attachment_2attachment_3attachment_3attachment_4attachment_4attachment_5attachment_5attachment_6attachment_6.slider-slide > img { width: 100%; display: block; }
.slider-slide > img:focus { margin: auto; }

Unformatted Attachment Preview

Econ 112: Macroeconomic Data Analysis
1. Using the log of the Real GDP data for your assigned country, run an Augmented Dickey Fuller test on
the data. Do you obtain evidence consistent with one or more stochastic trends being present in your
data? Please explain.
2. Repeat the exercise above for your data on Unemployment Rate, CPI Inflation, and the 3-Month Interest
Rate.
3. Using the log of the level of Real GDP for your assigned country, estimate the cyclical fluctuations of Real
GDP using: (i) the HP filter; (ii) the Baxter and King filter; (iii) the Hamilton filter. Feel free to set the
parameters of the filters (?, pL , pU and h) at your preferred values. Are there important differences in the
estimated measures of cyclical fluctuations across the three filtering methods? Please explain.
4. Please repeat the analysis of point 3 for your Unemployment Rate data.
5. Please attach the R-script used for all the above.
1
Data Analysis for Unemployment and Inflation Rate in Belgium
Xuhang Hou
Econ 112
Introduction
Fiscal and monetary policies have a great impact on unemployment and inflation rates. For
effective economic performance, nations should implement fiscal and monetary policies that
reduce unemployment rates while increasing inflation rates at a reasonable value. The report uses
R studio data analysis to explain the effects of fiscal and monetary policies on Belgium’s
unemployment rate and inflation rates. This is achieved by studying the unemployment rate and
inflation rate over time. Box Jenkins methodology makes it easy to understand such series and
easily predict their future values. Unemployment tread in Belgium increased exponentially from
1979 to 2021 (FRED, 2022). This model’s autocorrelations and partial autocorrelations were
differenced once to make the series stationary. The best model was ARIMA (1, 1, 1). The
unemployment rate data value of a given month would help predict the unemployment rates of the
following month. There was evidence of an increasing trend for the predicted values of
unemployment rates through the selected model.
For the inflation rates in Belgium, the rates increased for the initial years, and then a
downward trend was achieved overall years. One differencing was used to accomplish the
stationarity of the model. The best model was ARIMA (2, 1, 3). From the analysis of the two
series, we see that fiscal and monetary policies positively affected inflation in Belgium. Still, the
impact was negative for the unemployment rate.
Data
The report used unemployment and inflation rate datasets to develop autoregressive
moving average (ARMA) models. The datasets were downloaded in CSV format from
https://fred.stlouisfed.org (FRED, 2022). Belgium is used as the country of reference throughout the
analysis. R version 4.1.2 (2021-11-01) was used to analyze the two datasets. The unemployment
rate data frame has 515 (months) observations and two variables, while the inflation rate has 61
(years) observations with two variables.
Table 1: Unemployment rate
Table 2: Inflation rate
The first column in Table 1 presented the date when the unemployment rate was recorded
as a character, while the second column presents the unemployment rate in numeric form.
Unemployment rate observations were made monthly from January 1979 up to December 2021.
On the other hand, the first column in Table 2 presents the date on which the inflation rate was
recorded in character form and the second column gives the inflation rate in numeric form. For the
inflation dataset, the observations were made yearly at the beginning of the year, from January
1960 to January 2021 (FRED, 2022).
Preferred Specification
Box Jenkins methodology
Box Jenkins methodology is specified in three steps to properly analyze the two-time series
datasets.
Step 1: model identification
Identification of the model involves correctly working with time-series data to plot the raw data,
Plot ACF and PACF, and assess them for a plausible model. To work with the datasets in R, the
variables are converted into a time series object so that tread of the dataset can be plotted over time
using necessary time series libraries (National Bank of Belgium, 2021). At this stage, we check
whether the series is stationary; the series has a zero mean and equal variance. This is assessed
using a time series plot, as shown below.
The data exhibited an increasing trend for overall years based on the unemployment dataset. This
indicates a trend component in the data; hence, the data is not stationary. The plot suggests that
Belgium experienced an exponential increment of unemployment from 1979 to 2021.
According to the above-inflation rate data plot, Belgium experienced a considerable rising trend
from 1979 to1975. From 1975 to 2021, the series exhibited a strong declining trend component;
this clearly shows that the series does not have a zero mean and equal variance, indicating that it
is not stationary.
ACF and PACF for the unemployment dataset
The ACF for the unemployment raw series is progressively falling as the number of delays
increases, indicating that the raw series is not stationary, according to the autocorrelation function
(ACF). This pattern could also be described as gradually dying. Furthermore, according to the raw
series’ Partial Autocorrelation Function (PACF), one significant spike exceeds the standard error
line. This indicates that the raw series can be converted to stationary series by performing the first
differencing.
ACF and PACF for the inflation dataset
Again, ACF for the inflation raw series is progressively falling as the number of lags increases, as
in the case for the unemployment raw series. PACF inform us that we should do a one differencing
of the original series to make it stationary.
Differencing
After the first differencing, ACF and PACF made the unemployment and inflation series
stationary.
The series after the first difference to the raw unemployment series is shown in the graph
above. The rate of decline in unemployment series moving from positive autocorrelation to
negative at lag 12 is substantially faster, according to the ACF of the first difference. In the
meantime, PACF reveals a large surge at lag one and lag twelve, which is just above the significant
line.
We may pick the order of our ARIMA model based on the ACF and PACF after
differencing the original series. The first difference was made to change the original series into a
stationary series, d=1 in this model. Since ACF displays a falling trend, there are multiple notable
spikes, particularly at lag 1, after differentiating, the order for p=1 based on PACF, and q=0 given
the declining shape of ACF. As a result, the most appropriate model based on ACF and PACF is
ARIMA (1, 1, 0).
The figure above shows the series after performing the first difference to the original
inflation series and inflation data. Based on the ACF of the first difference, the decay rate is not
much faster in the inflation series, but the ACF cuts immediately after la 1, suggesting that an MA
(1) model would be preferred PACF; it shows a significant spike at lag four. As a result, the most
appropriate model based on ACF and PACF is ARIMA (0, 1, 1).
Step 2: Estimation step
Several options will be investigated to get more conclusive evidence.
For this example, we choose ARIMA (1, 1, 1), ARIMA (2, 1,1), ARIMA (2, 1, 2), ARIMA (3, 1,
0), ARIMA (3, 1, 1), ARIMA (3, 1, 2) and ARIMA (3, 1, 3) as competing alternatives in both
unemployment model and inflation model.
We chose ARIMA (3, 1, 2) as the best model based on the lowest AIC value.
Ljung-Box test
H0: Residuals are normally distributed
H1: Residuals are not normally distributed
P-value
ARIMA (1, 1, 0)
ARIMA (2,1,3)
0.7801
0.9347
We fail to reject the null hypothesis and conclude that the residuals from the two models are in did
normally distributed.
Step 3. Model Diagnostic
At the last stage, Box Jenkins methodology is a diagnostic assessment of the model after
the model is fitted. Residual autocorrelation plots are looked at to determine existing high
correlation values or additional structures. The model is considered modest, and a forecast is
generated if the values of partial autocorrelations and autocorrelations are small. The p/q values
are modified. The model is re-estimated in case the autocorrelations are extremely high. The
reviewing and modifying procedure for the p and q values is carried out until the residuals have
no development of more structure. The application helps in generating forecasts and related
probability limitations after selecting the appropriate data model.
Checking whether residuals are normally distributed in both models
The residuals are normally distributed in both models.
Limitations
The main limitation of this approach is that the model identified through ACFs and PACF doesn’t
mean it would be the best model. A different model might emerge the best through the use of AIC.
Future work
For this kind of analysis, other methods such as cross-correlation and rolling correlation can be
explored for diverse results and decision-making.
References
FRED. (2022). Federal Reserve Economic Data | FRED | St. Louis Fed. Fred.stlouisfed.org.
Retrieved 29 January 2022, from https://fred.stlouisfed.org/.
National Bank of Belgium. (2021). Economic projections for Belgium. Nbb.be. Retrieved 29
January 2022, from https://www.nbb.be/en/publications-and-research/economic-andfinancial-publications/economic-projections-belgium.

Purchase answer to see full
attachment

Explanation & Answer:
8 Pages

Tags:
data analysis

economics

R studio

User generated content is uploaded by users for the purposes of learning and should be used following Studypool’s honor code & terms of service.