0% found this document useful (0 votes)
46 views61 pages

Time Series Analysis in Stata - PART 2

The document discusses Autoregressive Integrated Moving Average (ARIMA) models in time series analysis, focusing on their application to assess the effects of mineral resource rents on Zambia's GDP per capita. It outlines research objectives, hypotheses, and methodology, including the use of stationarity tests and cointegration analysis. The document also provides definitions for key variables and describes the theoretical frameworks relevant to the study.
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)
46 views61 pages

Time Series Analysis in Stata - PART 2

The document discusses Autoregressive Integrated Moving Average (ARIMA) models in time series analysis, focusing on their application to assess the effects of mineral resource rents on Zambia's GDP per capita. It outlines research objectives, hypotheses, and methodology, including the use of stationarity tests and cointegration analysis. The document also provides definitions for key variables and describes the theoretical frameworks relevant to the study.
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/ 61

Time Series Analysis

Part 2

Autoregressive Integrated Moving Average (ARIMA) Models

Dr John Musantu
When your data
violates the
above
assumption AR &
MA addresses
that
Remember
, white
noise is
zero mean
and
constant
variance
The second
figure has been
obtained by
getting the
residual
(difference
between actual
and fitted).
Basically, the
difference
between the
points on the
red line and the
black curve. The
new curve has
LESS TREND
‘d’ are the differences
on the dependent
variable

The variable looks


stationary; the
variance is flat. This is
a good variable to
work with now
The
intervening lag
is the one
before the lag
of interest.
Therefore, in
AR(1), there is
no such lag.
There’s no yt-1
Note: The
ARMA
We’ll further model just
demonstrate combines
graphically the the two and
meaning of tail-off and tails off
cut off
cuts off. One pops out
& rest are within
confidence interval

Tailing
off

Tailing
off cuts off
Tailing
off

Tailing
off
Note: that in tail off they come
down so quickly but in slow
decay they take time. This is an
example of non-stationary data.
You can difference this variable

ACF SHOWS spikes every after


four lags, hence, shows
seasonality. In this case, you’ll
need to have some lags in your
ARIMA model to correct for that
Note: the 2k
and the In(N)k
are the penalty
WORKING EXAMPLE ON TIME SERIES
Step-by-Step Example
Example Topic: THE EFFECTS OF MINERAL RESOURCE RENTS ON
ZAMBIA’S GDP PER CAPITA, WITH PRESENCE OF
HUMAN DEVELOPMENT
❑ Highlight the overarching question
(mischief) that you see to address in
Statement of the your research/dissertation
❑ What is the gap you seek to address
Problem
❖ Degree becomes higher as you go to
PhD
❑ Current situation against the
hypothesized or idea
❑ Should be well done and connected
to the next sections on objectives;
questions; hypothesis; and ultimately
methodology
❑ General Objective:
❖ To determine the effects of mineral rents on GDP
per capita in Zambia, with the presence of human
Objectives development.
❑ Specific Objectives:
❖ To establish the relationship between Education
and GDP per capita;
❖ To establish the relationship between Life
expectancy and GDP per capita;
❖ To establish the relationship between Foreign
Direct Investment and GDP per capita;
❖ To establish the relationship between real interest
rates and GDP per capita;
Research Questions
❑ What is the relationship between mineral rents and GDP
per capita?
❑ What is the relationship between Education and GDP per
capita?
❑ What is the relationship between Life Expectancy and GDP
per capita?
❑ What is the relationship between Foreign Direct Investment
and GDP per capita?
❑ What is the relationship between Interest Rates and GDP
per capita?
❑ 𝐻0 : Mineral rents have no statistically
significant effect on GDP per capita
Research
Hypothesis ❑ 𝐻1 : Mineral rents have a statistically
significant effect on GDP per capita
❑ 𝐻0 : Education has no statistically significant
effect on GDP per capita
❑ 𝐻1 : Education has a statistically significant
effect on GDP per capita in
❑ 𝐻0 : Life Expectancy has no statistically
significant effect on GDP per capita
Research Hypothesis

❑ 𝐻0 : Foreign Direct Investment has no statistically


significant effect on GDP per capita
❑ 𝐻1 : Foreign Direct Investment has a statistically significant
effect on GDP per capita
❑ 𝐻0 : Interest rates have no statistically significant effect on
GDP per capita
❑ 𝐻1 : Interest rates have a statistically significant effect on
GDP per capita
The World Bank provided annual time series
statistics on:
Data Use in this
session GDP per capita, mineral rents, FDI,
education, interest rates and life expectancy

All the data was collected between 1970


and 2020
GDP Per Capita (GDPPC): This is the sum of gross value
added by all resident producers in the economy plus any
product taxes (less subsidies) not included in the valuation
of output. Divided by mid-year population (World Bank:
2020)
Education (EDU): This is the knowledge and growth that
comes through the educational process. It's also a branch
Definitions: of research that focuses on school-based teaching and
learning approaches (Webster: 2022)

Life Expectancy (LFEXP): This refers to the expected


number of years that a person is expected to live
(Encyclopedia of Epidemiology; 2007)
Definitions Mineral Rents (MR): Mineral rents are the resources
received by governments as a result of mineral extraction
in a certain location. It refers to the difference between
the cost of production and the value of production for a
mineral stock listed at world prices (indexmundi: 2011).

Foreign Direct Investment (FDI): This, according to the


IMF and the OECD, comprises the development or
financial expenditure in a foreign economy by a resident
of another nation with the goal of getting a long-term
return.

Real Interest Rates (RINT): The cost of borrowing is


included in this. This is the amount that a lender will
charge in addition to the loan amount in order to make a
profit (Investopedia: 2022).
To consider a global perspective, a research study was undertaken in the
countries’ Pakistan and India. The study focussed on economic growth
regarding natural resources.

Ordinary lest squares methods were used, and the vector error
correction modelling (VECM) model was used to analyse the data.

Literature Was noted that there was a significant bearing on economic growth by
Review – resources that were endowed in both countries, Pakistan and India
(Muhammad: 2018)
Empirical A limitation or research gap from this study was that only two variables
Review were considered in establishing the relationship between natural
resource rents and economic growth, the two variables between natural
resource rents and GDP per capita.

A study was undertaken by Davis and Tilton (2005). The study was
qualitative and was a desk review of theories that related to mining. In
this study, mineral abundance was considered in relation to growth of
economies across countries. Essentially, this was what the research
looked to ascertain. In ensuring this, a cross sectional study was
implored…….
Consider at least a maximum of 2 theoretical frameworks
>>> Consult supervisor!!!

Traditional view - Neoclassical Theory


Literature
Review –
Theoretical The traditional view theory postulates that mineral extractive
resources and economic development have a perfect positive
Framework linear relationship and that mineral resources will almost always
lead to economic development.

According to this theory, extractives activities would lead to a


rise in the capital formation of a country which leads to greater
economic activity and an increase on purchasing parity across
households (ceteris paribus) (Davis and Tilton, (2002).
The New view- Dependency Theory
Literature
Review –
Theoretical The new view theory essentially contradicts the views of the
traditional theory and placing more weight on the discussion of the
Framework resource curse. This theory advances the thinking that mineral
resources inhibit the growth capacity of host-nations as they are
often a conduit of exploitation by more technologically advanced
states. The theory also draws on the dependency theory of
development and indicates that dependence on mineral resources
only serves to increase the dependency gap (Davis and Tilton, 2002);
(Aunty, 1993).
Literature
Review –
Conceptual
Framework
Methodology
❑ Data
❑ Research approach –
qualitative/quantitative
❑ Sampling techniques
❑ Data collection:
secondary/primary
❑ Model specification
Model Specification
❑ The Autoregressive Distributive Lags Method (ARDL) was employed as the
method of estimate in this paper, This method was selected based on the
Augmented Dickey-Fuller (ADF) test for stationarity which had a mix of
integrated levels (1) and (0) at 5% significant levels, and the Johansen co-
integration test which indicated that there was co-integration and the
existence of a long-run relationship among variables. This approach was similar
to that of (Gochero 2020). The GDP function is given by the expression below.
❑ GDPPC = (mineral rents, FDI, education, life expectancy, real interest rates,
industry)... 𝑖
❑ The computed econometric model is represented by the following equation;
❑ GDPPC = 𝛼 + 𝛽1 (MR) + 𝛽2 (FDI) + 𝛽3 (EDU) + 𝛽4 (LFEXP) + 𝛽5 (RINT) + 𝛽6
(IND) + µ...𝑖𝑖
Pre-Estimation Procedures
❑ Stationarity tests were carried out for purposes of assessing whether the
statistical properties of the data to be analyzed do not change with time.
Further, to check for co-integration among the variables identified, a test
was undertaken, the Johansen co-integration test. Tests were done after
the Autoregressive Distributed Lag was calculated to guarantee that no
erroneous findings were produced. Furthermore, it was also imperative to
have all the properties of the data determined, and therefore there were
prior checks undertaken so that all the variables were appropriate. These
tests include stationarity, co-integration, and conventional linear
regression diagnostic tests like autocorrelation, normalcy, and multi-
collinearity.
Stationarity Test (Augmented Dickey-Fuller
test)

❑ To check if the economic variables in the study had a unit root,


the Augmented Dickey-Fuller (ADF) test was performed. To avoid
the erroneous results mentioned before, it is necessary to ensure
that the variables are stable. The judgment rule is that if the
expected (calculated) value is less than the table value in
absolute terms (or the p-value is greater than 5%), the data are
non-stationary.
❑ Null hypothesis: there is a unit root, hence, data series are not
stationary
❑ Alternative hypothesis: No unit root, hence, data stationery
Stationarity Test (Augmented Dickey-Fuller test) - STATA
❑ Housekeeping:
❖ clear all
❖ set more off
❖ cd “”
❖ use “”
❑ Conduct the Augmented Dickey-fuller test
❖ You can assess the data graphically
❖ line GDPgrowthannual MineralRentsofGDP ForeignDirectInvestmentneti
GDPPerCapitaAnnual LifeexpectancyatBirthtotal Year, legend(size(medsmall))
Stationarity Test (Augmented Dickey-Fuller test) -
STATA
❑ To conduct the actual Dickey-fuller test, you need to do it per model
variable
❖ Remember, Null is there is a unit root, meaning data not stationary
• dfuller GDPPerCapitaAnnual, lag(0)
• dfuller MineralRentsofGDP, lag(0)
• dfuller LifeexpectancyatBirthtotal, lag(0)
• dfuller ForeignDirectInvestmentneti, lag(0)
• Do this for all the variables in your estimation
• Note: lag(0) option means you starting at level (in the actual state of the
data entries)
Output – Stationary at Level

Here, we reject the This is the value you


null hypothesis, should consider in
hence, our variable your decision
is stationary at level
Output – Not stationary at level

Here, we fail to
reject the null
hypothesis, hence, This is the value you
our variable is not should consider in
stationary at level your decision
Output – Not stationary at level
❑ Because the variable is not stationary at level, we
need to perform the Dickey-fuller test at the
difference
❖ We’ll stop at the point when the variable
becomes stationary
Output – Not stationary at level

At these levels, the


data is still not
stationary. We fail to
reject null
Output – Not stationary at level

At lag 3, the data is


null stationery; we
reject the null
hypothesis
Cointegration test – Johansen test
❑ If some variables are stationary at 1st or 2nd difference, we’ll need to perform the
cointegration test to establish the long-run relationship(s)
❑ The cointegration test identifies scenarios where two or more non-stationary
time series are integrated together in a way that they cannot deviate from
equilibrium in the long term. The tests are used to identify the degree of
sensitivity of two variables to the same average price over a specified period of time

❑ To undertake this test, the Johansen co-integration test is employed. In a long-run


connection, this test allows for the presence of one or more co-integration
equations. For the given coefficients of the model, if the independent variable is
integrated of some order, by taking a linear relationship among them, if the
relationship is linear, the variables are said to be co-integrated to each other. When
two variables (dependent and independent) are stationary, then the variables can
be said to be co-integrated.
Cointegration test - Continue
❑ Null: No cointegration
❑ Alternative: Cointegration exists

❑ To perform the cointegration test, you need to first establish


the appropriate lag length for the dataset
❑ Command: varbasic GDPPerCapitaAnnual MineralRentsofGDP
ForeignDirectInvestmentneti Schoolenrollmentprimarygr
LifeexpectancyatBirthtotal Industryincludingconstruction
Realinterestrate
❑ When you execute this command, you’ll get a table
Cointegration test - Continue
❑ Null: No cointegration
❑ Alternative: Cointegration exists

❑ Conduct another command to get a new table


❑ Command: varsoc
Stata will indicate with
* which one the lag
lengths are
recommended based
on different selection
criteria. Go with one
that is being selected
by two or more criteria

This is the table


needed in your
selection of the
appropriate lag
length
Cointegration Test
❑ Now that we have selected the lag length , we can go
on and conducted the John test for cointegration.
❑ Command: vecrank GDPPerCapitaAnnual
MineralRentsofGDP ForeignDirectInvestmentneti
Schoolenrollmentprimarygr LifeexpectancyatBirthtotal
Industryincludingconstruction Realinterestrate, lags(1)
trend(constant)levela max
❑ Remember hypothesis
❖ Null: No cointegration
❖ Alternative: Cointegration exists

❑ Decision:
❖ You’ll need to use the trace figure to
ascertain whether you reject all fail to reject.
❖ If the trace statistic is above the critical
values, you reject null, hence, cointegration
exists
❖ You see that even using the max statistic we
make the same conclusion
❖ Note: each line has its own values, hence,
you making this decision for each line
❑ If the outcome in the previous in test tell us there is at least
some cointegration, we’ll move to conduct the regression
called the Vector Autoregression model
❑ Command: var GDPPerCapitaAnnual MineralRentsofGDP
ForeignDirectInvestmentneti Schoolenrollmentprimarygr
LifeexpectancyatBirthtotal Industryincludingconstruction
Realinterestrate, lags(1/1)
❑ Note: (1/1) because our appropriate lag was 1. Means, the
table will have one lag or difference
❑ You’ll check which relationships are significant in the table in
the next slide
Granger Causality Test
❑ To establish the direction of the influence, a granger causality test is
perfomed.
❑ To do this, we will need to perform the Vector Autoregression below:
❑ Step 1:
❑ Command: var GDPPerCapitaAnnual MineralRentsofGDP
ForeignDirectInvestmentneti Schoolenrollmentprimarygr
LifeexpectancyatBirthtotal Industryincludingconstruction
Realinterestrate, lags(1/1)
❑ Step 2:
❑ Command: vargranger
Post estimation Procedure
❑ You will also need to consider post-estimation analysis
❖ Wald Test – investigate short-run associations
❖ Autocorrelation Test (Breusch Godfrey) – joint test for
autocorrelation which allows for several lags to be employed in the
measure for the error’s autocorrelation
❖ Normality Test (Jarque- Bera test) – investigate whether data flows a
normal distribution or not
❖ Heteroskedasticity Test (Breusch-Pagan-Godfrey test) - Error term's
variance should be investigated to check if it remained consistent

You might also like