0% found this document useful (0 votes)
43 views29 pages

Assessment 2 Stata

This document discusses testing for unit roots in time series data for several economic variables in Ethiopia from 1980 to 2023. Augmented Dickey-Fuller unit root tests are conducted on the variables at level and with trends. Some variables like inflation are found to be stationary while others contain a unit root.

Uploaded by

beletemelaku391
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views29 pages

Assessment 2 Stata

This document discusses testing for unit roots in time series data for several economic variables in Ethiopia from 1980 to 2023. Augmented Dickey-Fuller unit root tests are conducted on the variables at level and with trends. Some variables like inflation are found to be stationary while others contain a unit root.

Uploaded by

beletemelaku391
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

1.

A researcher is interested to know the determinants of economic growth (proxied by lnRGD) in


Ethiopia
and the mode is incorporate (lnLP, LnFDI, CGFK, INF and OPEN) as explanatory variales. Using the
Real GDP growth data, please undertake the following activities using stata software, year (1980-2023),
LnLP is labour productivity, RGDP is the growth of real GDP, INF is inflation rate, OPEN is openess
(X+M/GDP), GCFK (gross capital formation proxiy for capital) as a ratio of RGDP, and lnFDI is
logarithm of Foreign direct investment. A
a) Undertake a line plot for each variables, note the command is: twoway (tsline, variable list)

. twoway (tsline lnLP)


8.50
8.00
lnLP
7.50
7.00

1980 1990 2000 2010 2020


Year

twoway (tsline INF )


40.00
30.00
10.00 20.00
INF
0.00
-10.00

1980 1990 2000 2010 2020


Year
twoway (tsline lnRGDP )

15.00
14.00
lnRGDP
13.00
12.00
11.00

1980 1990 2000 2010 2020


Year

twoway (tsline OPEN )


100.00
80.00
40.00 60.00
OPEN
20.00
0.00

1980 1990 2000 2010 2020


Year
twoway (tsline GCFk )

0.40
0.30
GCF(k)
0.20
0.10

1980 1990 2000 2010 2020


Year

twoway (tsline lnFDI )


15
10
lnFDI
5
0

1980 1990 2000 2010 2020


Year

b) Undertake unit root test using Augmented-Dickey Fuller unit root test (with and without constant, with
trend and without trend) etc. at level? Report the result and identify variables that have unit root problem
(non-stationary) and stationary (no unit root problem)? Do all variables are stationary at level? If no, what
is next?
. dfuller lnRGDP, constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 4.001 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000

. dfuller lnRGDP, noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 7.857 -2.631 -1.950 -1.607

. dfuller lnRGDP, trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.246 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9007

. dfuller lnRGDP, notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 4.001 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller lnLP, constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.067 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000

. dfuller lnLP,noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.100 -2.631 -1.950 -1.607

. dfuller lnLP,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.083 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9318

. dfuller lnLP,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.067 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller INF , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.410 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0106

. dfuller INF ,noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.035 -2.631 -1.950 -1.607

. dfuller INF ,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -4.993 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.0002

. dfuller INF ,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.410 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0106


. dfuller OPEN , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.478 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000

. dfuller OPEN , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 6.102 -2.631 -1.950 -1.607

. dfuller OPEN , trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -0.678 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9745

. dfuller OPEN , notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.478 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller GCFk , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.018 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.7467

. dfuller GCFk , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 0.718 -2.631 -1.950 -1.607

. dfuller GCFk ,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.375 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.0548

. dfuller GCFk ,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.018 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.7467


. dfuller lnFDI , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.063 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0294

. dfuller lnFDI , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.659 -2.631 -1.950 -1.607

. dfuller lnFDI , trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.975 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.1391

. dfuller lnFDI , notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.063 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0294

c) Undertake unit root test using Augmented-Dickey Fuller unit root test (with and without constant, with
trend and without trend) at first difference if there is/are non-stationary variable/s at question a? If there
is still non-stationary variable, at second difference run the units root test? What is the result now? If all
variables are stationary at different order what method you intended to use?
. dfuller d1.lnRGDP, constant lag(0)

Dickey-Fuller test for unit root Number of obs = 42

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -4.474 -3.634 -2.952 -2.610

MacKinnon approximate p-value for Z(t) = 0.0002

. dfuller d1. lnRGDP, noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 7.857 -2.631 -1.950 -1.607

. dfuller d1. lnRGDP, trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.246 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9007

. dfuller d1. lnRGDP, notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 4.001 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller d1. lnLP, constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.067 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000

. dfuller d1. lnLP,noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.100 -2.631 -1.950 -1.607

. dfuller d1. lnLP,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.083 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9318

. dfuller d1. lnLP,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.067 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller d1. INF , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.410 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0106

. dfuller d1. INF ,noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.035 -2.631 -1.950 -1.607

. dfuller d1. INF ,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.410 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0106

. dfuller d1. OPEN , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.478 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller d1. OPEN , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 6.102 -2.631 -1.950 -1.607

. dfuller d1. OPEN , trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -0.678 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9745

. dfuller d1. OPEN , notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.478 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000

. dfuller d1. GCFk , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.018 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.7467

. dfuller d1. GCFk , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 0.718 -2.631 -1.950 -1.607


. dfuller d1. GCFk ,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.375 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.0548

. dfuller d1. GCFk ,notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.018 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.7467

. dfuller d1. lnFDI , constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.063 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0294

. dfuller d1. lnFDI , noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.659 -2.631 -1.950 -1.607


. dfuller d1. lnFDI , trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -2.975 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.1391

. dfuller d1. lnFDI , notrend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -3.063 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 0.0294

. dfuller d2.lnRGDP, noconstant lag(0)

Dickey-Fuller test for unit root Number of obs = 41

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -8.486 -2.634 -1.950 -1.606

. dfuller d2. lnLP, constant lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) 3.067 -3.628 -2.950 -2.608

MacKinnon approximate p-value for Z(t) = 1.0000


. dfuller d2. lnLP,trend lag(0)

Dickey-Fuller test for unit root Number of obs = 43

Interpolated Dickey-Fuller
Test 1% Critical 5% Critical 10% Critical
Statistic Value Value Value

Z(t) -1.083 -4.214 -3.528 -3.197

MacKinnon approximate p-value for Z(t) = 0.9318

d) Undertake lag length selection and decide the optimal length?


. varsoc lnRGDP lnLP INF OPEN GCFk lnFDI

Selection-order criteria
Sample: 1984 - 2023 Number of obs = 40

lag LL LR df p FPE AIC HQIC SBIC

0 -269.377 .038451 13.7688 13.8604 14.0222


1 -55.8792 426.99 36 0.000 5.5e-06 4.89396 5.53514 6.66728*
2 7.62911 127.02 36 0.000 1.6e-06 3.51854 4.7093 6.81186
3 55.1191 94.98 36 0.000 1.3e-06 2.94405 4.68438 7.75735
4 118.919 127.6* 36 0.000 7.0e-07* 1.55403* 3.84395* 7.88733

Endogenous: lnRGDP lnLP INF OPEN GCFk lnFDI


Exogenous: _cons

e) Undertake Johanson Co-integration test and identify the presence of long-run relationship or not? And
how much long-run relationship exists?
. vecrank lnRGDP lnLP INF OPEN GCFk lnFDI, trend(constant)

Johansen tests for cointegration


Trend: constant Number of obs = 42
Sample: 1982 - 2023 Lags = 2

5%
maximum trace critical
rank parms LL eigenvalue statistic value
0 42 -60.570137 . 119.0326 94.15
1 53 -36.40331 0.68362 70.6990 68.52
2 62 -21.262107 0.51374 40.4166* 47.21
3 69 -11.24941 0.37923 20.3912 29.68
4 74 -5.5607739 0.23730 9.0139 15.41
5 77 -2.3238155 0.14285 2.5400 3.76
6 78 -1.0538221 0.05868

f) Estimate the long-run and short-run estimates using VECM (vector Error correction Model)?
. vec lnRGDP lnLP INF OPEN GCFk lnFDI, trend(constant)

Vector error-correction model

Sample: 1982 - 2023 No. of obs = 42


AIC = 4.2573
Log likelihood = -36.40331 HQIC = 5.061039
Det(Sigma_ml) = 2.28e-07 SBIC = 6.450074

Equation Parms RMSE R-sq chi2 P>chi2

D_lnRGDP 8 .053068 0.7051 81.28285 0.0000


D_lnLP 8 .01801 0.9024 314.4349 0.0000
D_INF 8 8.9327 0.4450 27.26477 0.0006
D_OPEN 8 2.17836 0.7637 109.8992 0.0000
D_GCFk 8 .026557 0.5569 42.73488 0.0000
D_lnFDI 8 2.9856 0.3958 22.27423 0.0044
Coef. Std. Err. z P>|z| [95% Conf. Interval]

D_lnRGDP
_ce1
L1. .0507825 .0344699 1.47 0.141 -.0167772 .1183423

lnRGDP
LD. .0289351 .1967938 0.15 0.883 -.3567737 .4146438

lnLP
LD. -.1552272 .2477698 -0.63 0.531 -.640847 .3303926

INF
LD. .0001766 .0011093 0.16 0.874 -.0019976 .0023507

OPEN
LD. .0076027 .0032266 2.36 0.018 .0012786 .0139268

GCFk
LD. .2482783 .2714232 0.91 0.360 -.2837015 .7802581

lnFDI
LD. -.0002838 .0025704 -0.11 0.912 -.0053216 .0047541

_cons .0423952 .0130314 3.25 0.001 .016854 .0679364

D_lnLP
_ce1
L1. -.0044866 .0116984 -0.38 0.701 -.027415 .0184417

lnRGDP
LD. .6515921 .0667877 9.76 0.000 .5206906 .7824936

lnLP
LD. .2794474 .0840879 3.32 0.001 .1146382 .4442567

INF
LD. -.0002661 .0003765 -0.71 0.480 -.001004 .0004717

OPEN
LD. .0001617 .0010951 0.15 0.883 -.0019845 .002308

GCFk
LD. .1964101 .0921154 2.13 0.033 .0158673 .376953

lnFDI
LD. .0004111 .0008723 0.47 0.637 -.0012986 .0021209

_cons -.0262377 .0044226 -5.93 0.000 -.0349058 -.0175696

D_INF
_ce1
L1. -2.066523 5.802213 -0.36 0.722 -13.43865 9.305607

lnRGDP
LD. -88.85891 33.12571 -2.68 0.007 -153.7841 -23.9337

lnLP
LD. 24.64216 41.70634 0.59 0.555 -57.10077 106.3851

INF
LD. -.1397635 .1867234 -0.75 0.454 -.5057346 .2262075

OPEN
LD. 1.013746 .5431304 1.87 0.062 -.0507696 2.078262

GCFk
LD. 4.812512 45.68786 0.11 0.916 -84.73405 94.35907

lnFDI
LD. -.8749578 .4326655 -2.02 0.043 -1.722967 -.0269491

_cons 3.754275 2.193543 1.71 0.087 -.5449907 8.05354

D_OPEN
_ce1
L1. 7.725559 1.414951 5.46 0.000 4.952307 10.49881

lnRGDP
LD. -3.443999 8.078166 -0.43 0.670 -19.27691 12.38892

lnLP
LD. -25.43387 10.17067 -2.50 0.012 -45.36802 -5.499718

INF
LD. -.2238752 .0455351 -4.92 0.000 -.3131224 -.1346281

OPEN
LD. .501957 .1324499 3.79 0.000 .2423599 .7615541

GCFk
LD. -11.49174 11.14162 -1.03 0.302 -33.32892 10.34544

lnFDI
LD. -.3199437 .1055115 -3.03 0.002 -.5267424 -.113145

_cons 1.096602 .534926 2.05 0.040 .0481662 2.145038

D_GCFk
_ce1
L1. -.0634868 .01725 -3.68 0.000 -.0972962 -.0296775

lnRGDP
LD. .3524517 .0984827 3.58 0.000 .1594291 .5454742

lnLP
LD. .2274653 .1239929 1.83 0.067 -.0155564 .4704869
Cointegrating equations

Equation Parms chi2 P>chi2

_ce1 5 338.7869 0.0000

Identification: beta is exactly identified

Johansen normalization restriction imposed

beta Coef. Std. Err. z P>|z| [95% Conf. Interval]

_ce1
lnRGDP 1 . . . . .
lnLP .6094553 .4173725 1.46 0.144 -.2085798 1.42749
INF .0407158 .0074674 5.45 0.000 .0260801 .0553516
OPEN -.0566145 .0063327 -8.94 0.000 -.0690264 -.0442026
GCFk 8.224228 2.095426 3.92 0.000 4.117268 12.33119
lnFDI .0193136 .0122189 1.58 0.114 -.004635 .0432621
_cons -18.15695 . . . . .

g) Assuming each variable interact each other’s, estimate the model using VAR (vector autoregrression)
. var lnRGDP lnLP INF OPEN GCFk lnFDI

Vector autoregression

Sample: 1982 - 2023 No. of obs = 42


Log likelihood = -1.053822 AIC = 3.764468
FPE = 1.97e-06 HQIC = 4.947328
Det(Sigma_ml) = 4.24e-08 SBIC = 6.991568

Equation Parms RMSE R-sq chi2 P>chi2

lnRGDP 13 .051514 0.9976 17626.59 0.0000


lnLP 13 .017556 0.9984 25650.43 0.0000
INF 13 7.44668 0.6945 95.48145 0.0000
OPEN 13 2.05252 0.9972 15189.32 0.0000
GCFk 13 .024129 0.9325 580.26 0.0000
lnFDI 13 2.89439 0.6118 66.20146 0.0000

Coef. Std. Err. z P>|z| [95% Conf. Interval]

lnRGDP
lnRGDP
L1. .8985024 .1832825 4.90 0.000 .5392752 1.25773
L2. .1325099 .1763376 0.75 0.452 -.2131053 .4781252

lnLP
L1. -.5081734 .2424338 -2.10 0.036 -.9833349 -.0330119
L2. .3402483 .2300201 1.48 0.139 -.1105828 .7910794

INF
L1. .0014107 .0012602 1.12 0.263 -.0010593 .0038807
L2. -.0002996 .0011476 -0.26 0.794 -.0025489 .0019496

OPEN
L1. .0041307 .0031689 1.30 0.192 -.0020803 .0103417
L2. -.0033336 .0032523 -1.02 0.305 -.009708 .0030409

GCFk
L1. .5334575 .3626176 1.47 0.141 -.1772599 1.244175
L2. -.1106144 .3218392 -0.34 0.731 -.7414078 .5201789

lnFDI
L1. .0012973 .0025277 0.51 0.608 -.0036569 .0062516
L2. .0010924 .0027427 0.40 0.690 -.0042832 .006468

_cons .790609 1.414057 0.56 0.576 -1.980893 3.56211


lnLP
lnRGDP
L1. .5504812 .0624624 8.81 0.000 .4280572 .6729052
L2. -.6143238 .0600955 -10.22 0.000 -.7321089 -.4965387

lnLP
L1. 1.265844 .082621 15.32 0.000 1.10391 1.427778
L2. -.3425495 .0783905 -4.37 0.000 -.496192 -.188907

INF
L1. .0001249 .0004295 0.29 0.771 -.0007169 .0009666
L2. .0006512 .0003911 1.67 0.096 -.0001153 .0014178

OPEN
L1. .001685 .00108 1.56 0.119 -.0004316 .0038017
L2. .0003028 .0011084 0.27 0.785 -.0018696 .0024752

GCFk
L1. .2113129 .1235795 1.71 0.087 -.0308984 .4535241
L2. -.0901899 .1096823 -0.82 0.411 -.3051632 .1247833

lnFDI
L1. .0008973 .0008614 1.04 0.298 -.0007911 .0025857
L2. .0010613 .0009347 1.14 0.256 -.0007707 .0028933

_cons 1.250213 .4819083 2.59 0.009 .3056903 2.194736

INF
lnRGDP
L1. -40.31594 26.49477 -1.52 0.128 -92.24475 11.61286
L2. 67.67777 25.49083 2.65 0.008 17.71666 117.6389

lnLP
L1. -40.6393 35.0455 -1.16 0.246 -109.3272 28.04863
L2. 54.48039 33.25102 1.64 0.101 -10.69041 119.6512

INF
L1. .1546913 .1821722 0.85 0.396 -.2023597 .5117424
L2. -.2491034 .1658939 -1.50 0.133 -.5742495 .0760427

OPEN
L1. .5713307 .4580899 1.25 0.212 -.3265089 1.46917
L2. -.9778249 .4701486 -2.08 0.038 -1.899299 -.0563505

GCFk
L1. -31.70784 52.41892 -0.60 0.545 -134.447 71.03135
L2. -44.07237 46.52412 -0.95 0.343 -135.258 47.11322

lnFDI
L1. -.8104045 .3654014 -2.22 0.027 -1.526578 -.0942309
L2. .4447796 .3964775 1.12 0.262 -.332302 1.221861

_cons -399.6463 204.4119 -1.96 0.051 -800.2862 .9937071


OPEN
lnRGDP
L1. 11.80777 7.302708 1.62 0.106 -2.505277 26.12081
L2. 3.070282 7.025992 0.44 0.662 -10.70041 16.84097

lnLP
L1. -16.50672 9.65953 -1.71 0.087 -35.43905 2.425616
L2. 30.85435 9.164919 3.37 0.001 12.89144 48.81726

INF
L1. .0106413 .0502118 0.21 0.832 -.0877721 .1090546
L2. .1351215 .045725 2.96 0.003 .0455021 .224741

OPEN
L1. .7912413 .1262625 6.27 0.000 .5437714 1.038711
L2. -.3213876 .1295862 -2.48 0.013 -.5753719 -.0674032

GCFk
L1. 16.19766 14.44813 1.12 0.262 -12.12016 44.51548
L2. -21.32492 12.82336 -1.66 0.096 -46.45825 3.808403

lnFDI
L1. -.0742649 .1007149 -0.74 0.461 -.2716625 .1231328
L2. .3224525 .1092804 2.95 0.003 .1082669 .5366382

_cons -279.8402 56.34169 -4.97 0.000 -390.2679 -169.4125


GCFk
lnRGDP
L1. .187894 .0858489 2.19 0.029 .0196333 .3561548
L2. -.2468115 .0825959 -2.99 0.003 -.4086965 -.0849265

lnLP
L1. .2500199 .1135552 2.20 0.028 .0274559 .4725839
L2. -.3126033 .1077406 -2.90 0.004 -.5237711 -.1014355

INF
L1. -.0015922 .0005903 -2.70 0.007 -.0027491 -.0004353
L2. -.0005705 .0005375 -1.06 0.289 -.001624 .000483

OPEN
L1. .0007261 .0014843 0.49 0.625 -.0021831 .0036353
L2. .0042128 .0015234 2.77 0.006 .001227 .0071985

GCFk
L1. -.2104359 .1698488 -1.24 0.215 -.5433335 .1224617
L2. .1652101 .1507484 1.10 0.273 -.1302513 .4606716

lnFDI
L1. .0026906 .001184 2.27 0.023 .0003701 .0050112
L2. -.0019032 .0012847 -1.48 0.138 -.0044211 .0006147

_cons 1.358892 .6623397 2.05 0.040 .0607298 2.657054

lnFDI
lnRGDP
L1. -4.121028 10.29804 -0.40 0.689 -24.30482 16.06276
L2. 6.261979 9.907827 0.63 0.527 -13.15701 25.68096

lnLP
L1. -10.64837 13.62156 -0.78 0.434 -37.34613 16.04939
L2. -3.025055 12.92407 -0.23 0.815 -28.35577 22.30566

INF
L1. .0615492 .0708071 0.87 0.385 -.0772301 .2003285
L2. -.0122778 .06448 -0.19 0.849 -.1386563 .1141006

OPEN
L1. -.4866538 .1780513 -2.73 0.006 -.8356279 -.1376797
L2. .5763307 .1827383 3.15 0.002 .2181702 .9344912

GCFk
L1. 2.288779 20.37429 0.11 0.911 -37.64409 42.22165
L2. 1.620746 18.08309 0.09 0.929 -33.82146 37.06295

lnFDI
L1. .321275 .142025 2.26 0.024 .0429112 .5996388
L2. .3721435 .1541037 2.41 0.016 .0701058 .6741812

_cons 75.55921 79.45123 0.95 0.342 -80.16234 231.2808

h) Undertake, various pre and post-estimation tests (multicollinearity, heteroskedasticity, autocorrelation,


normality and model stability)
regression:
. reg lnRGDP lnLP INF OPEN GCFk lnFDI

Source SS df MS Number of obs = 44


F( 5, 38) = 602.26
Model 33.9872838 5 6.79745677 Prob > F = 0.0000
Residual .428888355 38 .011286536 R-squared = 0.9875
Adj R-squared = 0.9859
Total 34.4161722 43 .800376097 Root MSE = .10624

lnRGDP Coef. Std. Err. t P>|t| [95% Conf. Interval]

lnLP -.4608266 .1964864 -2.35 0.024 -.8585925 -.0630607


INF .0035394 .0023189 1.53 0.135 -.0011549 .0082337
OPEN .0276521 .0025588 10.81 0.000 .0224722 .0328321
GCFk 1.421117 .6558104 2.17 0.037 .0934985 2.748736
lnFDI .0172392 .0048956 3.52 0.001 .0073285 .0271498
_cons 14.76224 1.415451 10.43 0.000 11.89681 17.62767

multicollinearity:
. estat vif

Variable VIF 1/VIF

OPEN 26.69 0.037462


lnLP 18.78 0.053244
GCFk 10.05 0.099477
INF 2.56 0.391100
lnFDI 1.40 0.715875

Mean VIF 11.90

Heteroskedasticity:
. hettest

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity


Ho: Constant variance
Variables: fitted values of lnRGDP

chi2(1) = 0.22
Prob > chi2 = 0.6376

Autocorrelation:
. pwcorr lnRGDP lnLP INF OPEN GCFk lnFDI, sig

lnRGDP lnLP INF OPEN GCFk lnFDI

lnRGDP 1.0000

lnLP 0.9351 1.0000


0.0000

INF 0.6615 0.6312 1.0000


0.0000 0.0000

OPEN 0.9869 0.9663 0.6719 1.0000


0.0000 0.0000 0.0000

GCFk 0.9256 0.8985 0.4589 0.9174 1.0000


0.0000 0.0000 0.0017 0.0000

lnFDI 0.2304 0.0329 -0.0400 0.1305 0.2485 1.0000


0.1325 0.8322 0.7965 0.3986 0.1038

Normality:
. swilk lnRGDP lnLP INF OPEN GCFk lnFDI

Shapiro-Wilk W test for normal data

Variable Obs W V z Prob>z

lnRGDP 44 0.88972 4.693 3.272 0.00053


lnLP 44 0.86368 5.801 3.721 0.00010
INF 44 0.97335 1.134 0.266 0.39508
OPEN 44 0.81387 7.920 4.380 0.00001
GCFk 44 0.94125 2.500 1.939 0.02623
lnFDI 44 0.90097 4.214 3.044 0.00117

model stability:
. ovtest

Ramsey RESET test using powers of the fitted values of lnRGDP


Ho: model has no omitted variables
F(3, 35) = 14.75
Prob > F = 0.0000

2. Using panel data, suppose you are interested to investigate the determinants of Economic growth in
four
selected east African countries, namely (Ethiopia, Kenya, Uganda and Djibouti with Panel ID, 1, 2, 3 & 4
respectively) from 2000 to 2018. Where RGDP is the dependent variable, however, lp is labour
productivity, K is capital (Gross capital formation), la (land area) and Inf is inflation rate).
a) Plot graphically for all variables

. xtset id year
panel variable: id (strongly balanced)
time variable: year, 2000 to 2018
delta: 1 unit

1 2
0.0020.00
60.00 -20.00 60.00
40.00

3 4
0.00
-20.00 40.00
20.00

2000 2005 2010 2015 20202000 2005 2010 2015 2020


year
rgdp K
lp la
inf
Graphs by id

b) Undertake stationarity test


. xtunitroot llc lp

Levin-Lin-Chu unit-root test for lp

Ho: Panels contain unit roots Number of panels = 4


Ha: Panels are stationary Number of periods = 19

AR parameter: Common Asymptotics: N/T -> 0


Panel means: Included
Time trend: Not included

ADF regressions: 1 lag


LR variance: Bartlett kernel, 8.00 lags average (chosen by LLC)

Statistic p-value

Unadjusted t 1.2627
Adjusted t* 1.3740 0.9153

.
. xtunitroot llc K

Levin-Lin-Chu unit-root test for K

Ho: Panels contain unit roots Number of panels = 4


Ha: Panels are stationary Number of periods = 19

AR parameter: Common Asymptotics: N/T -> 0


Panel means: Included
Time trend: Not included

ADF regressions: 1 lag


LR variance: Bartlett kernel, 8.00 lags average (chosen by LLC)

Statistic p-value

Unadjusted t -0.6523
Adjusted t* -0.7098 0.2389

. xtunitroot llc rgdp

Levin-Lin-Chu unit-root test for rgdp

Ho: Panels contain unit roots Number of panels = 4


Ha: Panels are stationary Number of periods = 19

AR parameter: Common Asymptotics: N/T -> 0


Panel means: Included
Time trend: Not included

ADF regressions: 1 lag


LR variance: Bartlett kernel, 8.00 lags average (chosen by LLC)

Statistic p-value

Unadjusted t 1.0232
Adjusted t* 1.1134 0.8672

. xtunitroot llc la

Levin-Lin-Chu unit-root test for la

Ho: Panels contain unit roots Number of panels = 4


Ha: Panels are stationary Number of periods = 19

AR parameter: Common Asymptotics: N/T -> 0


Panel means: Included
Time trend: Not included

ADF regressions: 1 lag


LR variance: Bartlett kernel, 8.00 lags average (chosen by LLC)

Statistic p-value

Unadjusted t -0.2026
Adjusted t* -0.2205 0.4127
. xtunitroot llc inf

Levin-Lin-Chu unit-root test for inf

Ho: Panels contain unit roots Number of panels = 4


Ha: Panels are stationary Number of periods = 19

AR parameter: Common Asymptotics: N/T -> 0


Panel means: Included
Time trend: Not included

ADF regressions: 1 lag


LR variance: Bartlett kernel, 8.00 lags average (chosen by LLC)

Statistic p-value

Unadjusted t -0.6219
Adjusted t* -0.6767 0.2493

c) Undertake regression analysis with (Fe, re and be) estimators


. xtreg rgdp lp K la inf,fe

Fixed-effects (within) regression Number of obs = 76


Group variable: id Number of groups = 4

R-sq: within = 0.4963 Obs per group: min = 19


between = 0.0816 avg = 19.0
overall = 0.2896 max = 19

F(4,68) = 16.75
corr(u_i, Xb) = -0.2862 Prob > F = 0.0000

rgdp Coef. Std. Err. t P>|t| [95% Conf. Interval]

lp .2821498 3.342058 0.08 0.933 -6.386822 6.951122


K -.1521516 .2941197 -0.52 0.607 -.7390583 .4347552
la 1.905005 .987179 1.93 0.058 -.0648805 3.87489
inf .1419315 .0779419 1.82 0.073 -.0135991 .2974622
_cons -16.47014 11.79331 -1.40 0.167 -40.00332 7.063038

sigma_u 5.9747698
sigma_e 4.6570745
rho .62206355 (fraction of variance due to u_i)

F test that all u_i=0: F(3, 68) = 18.17 Prob > F = 0.0000

.
. xtreg rgdp lp K la inf,be
note: lp omitted because of collinearity

Between regression (regression on group means) Number of obs = 76


Group variable: id Number of groups = 4

R-sq: within = 0.0789 Obs per group: min = 19


between = 1.0000 avg = 19.0
overall = 0.0111 max = 19

F(3,0) = .
sd(u_i + avg(e_i.))= 0 Prob > F = .

rgdp Coef. Std. Err. t P>|t| [95% Conf. Interval]

lp 0 (omitted)
K 2.280461 . . . . .
la -5.237818 . . . . .
inf -.8037623 . . . . .
_cons 17.83259 . . . . .

. xtreg rgdp lp K la inf,re

Random-effects GLS regression Number of obs = 76


Group variable: id Number of groups = 4

R-sq: within = 0.3680 Obs per group: min = 19


between = 0.5717 avg = 19.0
overall = 0.4353 max = 19

Wald chi2(4) = 54.74


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

rgdp Coef. Std. Err. z P>|z| [95% Conf. Interval]

lp 6.322553 1.918533 3.30 0.001 2.562299 10.08281


K .0178615 .2483453 0.07 0.943 -.4688864 .5046093
la -.1693791 .9012806 -0.19 0.851 -1.935857 1.597098
inf .1851378 .0952637 1.94 0.052 -.0015757 .3718512
_cons -15.0445 7.702876 -1.95 0.051 -30.14186 .0528603

sigma_u 0
sigma_e 4.6570745
rho 0 (fraction of variance due to u_i)

d) Arellano-Bond dynamic panel-data estimation


. xtabond rgdp lp K la inf

Arellano-Bond dynamic panel-data estimation Number of obs = 68


Group variable: id Number of groups = 4
Time variable: year
Obs per group: min = 17
avg = 17
max = 17

Number of instruments = 63 Wald chi2(5) = 114.59


Prob > chi2 = 0.0000
One-step results

rgdp Coef. Std. Err. z P>|z| [95% Conf. Interval]

rgdp
L1. -.0791192 .1131332 -0.70 0.484 -.3008563 .1426178

lp -2.753609 2.881037 -0.96 0.339 -8.400337 2.89312


K -.6258412 .2374269 -2.64 0.008 -1.091189 -.1604931
la 4.367621 .9558745 4.57 0.000 2.494141 6.2411
inf .0305142 .0632062 0.48 0.629 -.0933677 .1543962
_cons -21.14044 9.201567 -2.30 0.022 -39.17518 -3.105702

Instruments for differenced equation


GMM-type: L(2/.).rgdp
Standard: D.lp D.K D.la D.inf
Instruments for level equation
Standard: _cons

e) Undertake mode check

You might also like