* Install packages (clubConvergence, moremata, wbopendata)
*net install st0503_1, from(http://www.stata-journal.com/software/sj19-1)
*ssc install moremata
*ssc install wbopendata
* Clean the evironment
*clear all
*macro drop _all
*set more off
*cls
*version 14
* Reference year
local year_base = 2010
wbopendata, indicator(NY.GDP.PCAP.KD) clear long
Metadata for indicator NY.GDP.PCAP.KD
--------------------------------------------------------------------------------
Name: GDP per capita (constant 2010 US$)
--------------------------------------------------------------------------------
Collection: 2 World Development Indicators
--------------------------------------------------------------------------------
Description: GDP per capita is gross domestic product divided by midyear
population. GDP is the sum of gross value added by all resident
producers in the economy plus any product taxes and minus any subsidies
not included in the value of the products. It is calculated without
making deductions for depreciation of fabricated assets or for depletion
and degradation of natural resources. Data are in constant 2010 U.S.
dollars.
--------------------------------------------------------------------------------
Note: World Bank national accounts data, and OECD National Accounts data
files.
--------------------------------------------------------------------------------
Topic(s): 3 Economy and Growth
--------------------------------------------------------------------------------
*wbopendata, indicator(NY.GDP.PCAP.PP.KD) clear long
keep if countrycode=="AUT" | countrycode=="BEL" | countrycode=="BGR" | countrycode=="CZE" | countrycode=="CYP" |countrycode=="DNK" |countrycode=="DEU" | countrycode=="ESP"| countrycode=="EST" |countrycode=="FIN" |countrycode=="IRL" |countrycode=="FRA" |countrycode=="GBR" |countrycode=="GRC" |countrycode=="HUN" |countrycode=="HRV" | countrycode=="IRL" |countrycode=="ITA" |countrycode=="LTU" |countrycode=="MLT" |countrycode=="LVA" |countrycode=="NLD" | countrycode=="POL" | countrycode=="PRT" | countrycode=="ROU" | countrycode=="SWE" | countrycode=="SVN" | countrycode=="SVK"
(14,579 observations deleted)
keep if year >= 2002
keep if year <= 2018
(1,134 observations deleted)
(54 observations deleted)
gen y = ny_gdp_pcap_kd
*gen y = ny_gdp_pcap_pp_kd
gen ln_y = ln(y)
* Generate country id and declare panel dataset
egen id = group(countryname)
xtset id year
* Compute the HP filter with parameter 400 for all countries
pfilter ln_y,method(hp) trend(trend_ln_y) smooth(400)
Panel variable: id (strongly balanced)
Time variable: year, 2002 to 2018
Delta: 1 unit
logtreg trend_ln_y, kq(0.3)
log t test:
-----------------------------------------------------
Variable | Coeff SE T-stat
-----------+-----------------------------------------
log(t) | -0.5298 0.0314 -16.8661
-----------------------------------------------------
The number of individuals is 27.
The number of time periods is 17.
The first 5 periods are discarded before regression.
psecta trend_ln_y, name(countryname) kq(0.3) gen(club_trend_ln_y) noprt
matrix b=e(bm)
matrix t=e(tm)
matrix result1=(b \ t)
matlist result1, border(rows) rowtitle("log(t)") format(%9.3f) left(4)
tab club_trend_ln_y if year == `year_base', missing
xxxxxxxxxxxxxxxxxxxxxxxxxxxx Club classifications xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> x
------------------------------- Club 1 :(2)-------------------------------
| Denmark | Ireland |
--------------------------------------------------------------------------
------------------------------- Club 2 :(4)-------------------------------
| Austria | Belgium | Finland | Germany |
--------------------------------------------------------------------------
------------------------------- Club 3 :(3)-------------------------------
| France | Malta | United Kingdom |
--------------------------------------------------------------------------
------------------------------- Club 4 :(7)-------------------------------
| Czech Republic | Italy | Lithuania | Poland | Slovak Republic |
| Slovenia | Spain |
--------------------------------------------------------------------------
------------------------------- Club 5 :(8)-------------------------------
| Croatia | Cyprus | Estonia | Greece | Hungary | Latvia | Portugal |
| Romania |
--------------------------------------------------------------------------
----------------------- Not convergent Group 6 :(3) ----------------------
| Bulgaria | Netherlands | Sweden |
--------------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
log(t) | Club1 Club2 Club3 Club4 Club5
-------------+-------------------------------------------------------
Coeff | 2.837 0.755 0.100 0.202 0.023
T-stat | 2.323 5.816 1.104 2.453 0.336
---------------------------------------------------------------------
-------------------------
log(t) | Group6
-------------+-----------
Coeff | -0.586
T-stat | -18.246
-------------------------
club_trend_ |
ln_y | Freq. Percent Cum.
------------+-----------------------------------
1 | 2 7.41 7.41
2 | 4 14.81 22.22
3 | 3 11.11 33.33
4 | 7 25.93 59.26
5 | 8 29.63 88.89
. | 3 11.11 100.00
------------+-----------------------------------
Total | 27 100.00
scheckmerge trend_ln_y, kq(0.3) club(club_trend_ln_y)
matrix b=e(bm)
matrix t=e(tm)
matrix result2=(b \ t)
matlist result2, border(rows) rowtitle("log(t)") format(%9.3f) left(4)
The log t test for Club 1+2
log t test:
-----------------------------------------------------
Variable | Coeff SE T-stat
-----------+-----------------------------------------
log(t) | -1.2296 0.0663 -18.5413
-----------------------------------------------------
The number of individuals is 6.
The number of time periods is 17.
The first 5 periods are discarded before regression.
------------------------------------------------------
The log t test for Club 2+3
log t test:
-----------------------------------------------------
Variable | Coeff SE T-stat
-----------+-----------------------------------------
log(t) | -0.0955 0.0766 -1.2476
-----------------------------------------------------
The number of individuals is 7.
The number of time periods is 17.
The first 5 periods are discarded before regression.
------------------------------------------------------
The log t test for Club 3+4
log t test:
-----------------------------------------------------
Variable | Coeff SE T-stat
-----------+-----------------------------------------
log(t) | -0.0856 0.0591 -1.4468
-----------------------------------------------------
The number of individuals is 10.
The number of time periods is 17.
The first 5 periods are discarded before regression.
------------------------------------------------------
The log t test for Club 4+5
log t test:
-----------------------------------------------------
Variable | Coeff SE T-stat
-----------+-----------------------------------------
log(t) | -0.0387 0.0615 -0.6283
-----------------------------------------------------
The number of individuals is 15.
The number of time periods is 17.
The first 5 periods are discarded before regression.
------------------------------------------------------
----------------------------------------------------------
log(t) | Club1+2 Club2+3 Club3+4 Club4+5
-------------+--------------------------------------------
Coeff | -1.230 -0.096 -0.086 -0.039
T-stat | -18.541 -1.248 -1.447 -0.628
----------------------------------------------------------
imergeclub trend_ln_y, name(countryname) kq(0.3) club(club_trend_ln_y) gen(finalclub_trend_ln_y) noprt
matrix b=e(bm)
matrix t=e(tm)
matrix result3=(b \ t)
matlist result3, border(rows) rowtitle("log(t)") format(%9.3f) left(4)
xxxxxxxxxxxxxxxxxxxxxxxxxx Final Club classifications xxxxxxxxxxxxxxxxxxxxxxxxxx
> xxx
------------------------------- Club 1 :(2)-------------------------------
| Denmark | Ireland |
--------------------------------------------------------------------------
------------------------------- Club 2 :(7)-------------------------------
| Austria | Belgium | Finland | France | Germany | Malta |
| United Kingdom |
--------------------------------------------------------------------------
------------------------------- Club 3 :(15)-------------------------------
| Croatia | Cyprus | Czech Republic | Estonia | Greece | Hungary |
| Italy | Latvia | Lithuania | Poland | Portugal | Romania |
| Slovak Republic | Slovenia | Spain |
--------------------------------------------------------------------------
----------------------- Not convergent Group 4 :(3) ----------------------
| Bulgaria | Netherlands | Sweden |
--------------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> xxx
----------------------------------------------------------
log(t) | Club1 Club2 Club3 Group4
-------------+--------------------------------------------
Coeff | 2.837 -0.096 -0.039 -0.586
T-stat | 2.323 -1.248 -0.628 -18.246
----------------------------------------------------------
tab finalclub_trend_ln_y if year == `year_base', missing
finalclub_t |
rend_ln_y | Freq. Percent Cum.
------------+-----------------------------------
1 | 2 7.41 7.41
2 | 7 25.93 33.33
3 | 15 55.56 88.89
. | 3 11.11 100.00
------------+-----------------------------------
Total | 27 100.00