* Clean environment
clear all
macro drop _all
set more off
* Import spatial weights matrix and standardize it
import delimited "https://github.com/quarcs-lab/data-open/raw/master/ertur/Wd2.csv", clear
gen id = _n
order id, first
spset id
spmatrix fromdata Wd2 = v*, normalize(row) replace
spmatrix dir
(encoding automatically selected: ISO-8859-1)
(91 vars, 91 obs)
Sp dataset: <current>
Linked shapefile: <none>
Data: Cross sectional
Spatial-unit ID: _ID (equal to id)
Coordinates: <none>
------------------------------------------------------------------------
Weighting matrix name N x N Type Normalization
------------------------------------------------------------------------
Wd2 91 x 91 custom row
------------------------------------------------------------------------
* Load, describe and summarize dataset
use "https://github.com/quarcs-lab/data-open/raw/master/ertur/data91.dta", clear
spset id
describe
summarize
Sp dataset: data91.dta
Linked shapefile: <none>
Data: Cross sectional
Spatial-unit ID: _ID (equal to id)
Coordinates: <none>
Contains data from https://github.com/quarcs-lab/data-open/raw/master/ertur/data
> 91.dta
Observations: 91
Variables: 9 4 Jul 2021 19:57
--------------------------------------------------------------------------------
Variable Storage Display Value
name type format label Variable label
--------------------------------------------------------------------------------
xlong float %9.0g longitude of capital
ylat float %9.0g lattitude of capital
lny60 float %9.0g log of the initial level of per
worker income (in 1960)
lny95 float %9.0g log of the level of per worker
income in 1995
gy float %9.0g average rate of growth between
1960 and 1995 computed as
(lny95-lny60)/35
lns float %9.0g log of the average investment rate
of the period 1960-1995
lnngd float %9.0g log of the average rate of growth
of working-age population (n)
plus 0.05
id float %9.0g
_ID float %9.0g Spatial-unit ID
--------------------------------------------------------------------------------
Sorted by:
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
xlong | 91 10.84297 62.95249 -99.13 175.14
ylat | 91 12.67901 25.22909 -41.21 60.2
lny60 | 91 8.645392 .9706411 6.540302 10.37584
lny95 | 91 9.193177 1.224778 6.483891 10.93427
gy | 91 .0156587 .0178941 -.0343267 .0624467
-------------+---------------------------------------------------------
lns | 91 -2.047838 .6532882 -3.981711 -.8885791
lnngd | 91 -2.641229 .1272849 -2.939148 -2.379895
id | 91 46 26.41338 1 91
_ID | 91 46 26.41338 1 91
* Create variables
gen delta_gamma = 0.05
gen ln_gdp_60 = lny60
gen ln_gdp_95 = lny95
gen ln_gdp_growth = ln_gdp_95 - ln_gdp_60
gen ln_inv_gdp = lns
gen ln_ndg = lnngd
* Add labels to varaibles (Understand the meaning and construction of each variable)
label variable delta_gamma "Depreciation rate + Technological growth rate"
label variable ln_gdp_60 "Log GDP per woker in 1960"
label variable ln_gdp_95 "Log GDP per woker in 1995"
label variable ln_gdp_growth "Growth GDP per woker 1960-1995 (as log difference)"
label variable ln_inv_gdp "Log investment share"
label variable ln_ndg "Log (adjusted) population growth"
describe
summarize
Contains data from https://github.com/quarcs-lab/data-open/raw/master/ertur/data
> 91.dta
Observations: 91
Variables: 15 4 Jul 2021 19:57
--------------------------------------------------------------------------------
Variable Storage Display Value
name type format label Variable label
--------------------------------------------------------------------------------
xlong float %9.0g longitude of capital
ylat float %9.0g lattitude of capital
lny60 float %9.0g log of the initial level of per
worker income (in 1960)
lny95 float %9.0g log of the level of per worker
income in 1995
gy float %9.0g average rate of growth between
1960 and 1995 computed as
(lny95-lny60)/35
lns float %9.0g log of the average investment rate
of the period 1960-1995
lnngd float %9.0g log of the average rate of growth
of working-age population (n)
plus 0.05
id float %9.0g
_ID float %9.0g Spatial-unit ID
delta_gamma float %9.0g Depreciation rate + Technological
growth rate
ln_gdp_60 float %9.0g Log GDP per woker in 1960
ln_gdp_95 float %9.0g Log GDP per woker in 1995
ln_gdp_growth float %9.0g Growth GDP per woker 1960-1995 (as
log difference)
ln_inv_gdp float %9.0g Log investment share
ln_ndg float %9.0g Log (adjusted) population growth
--------------------------------------------------------------------------------
Sorted by:
Note: Dataset has changed since last saved.
Variable | Obs Mean Std. dev. Min Max
-------------+---------------------------------------------------------
xlong | 91 10.84297 62.95249 -99.13 175.14
ylat | 91 12.67901 25.22909 -41.21 60.2
lny60 | 91 8.645392 .9706411 6.540302 10.37584
lny95 | 91 9.193177 1.224778 6.483891 10.93427
gy | 91 .0156587 .0178941 -.0343267 .0624467
-------------+---------------------------------------------------------
lns | 91 -2.047838 .6532882 -3.981711 -.8885791
lnngd | 91 -2.641229 .1272849 -2.939148 -2.379895
id | 91 46 26.41338 1 91
_ID | 91 46 26.41338 1 91
delta_gamma | 91 .05 0 .05 .05
-------------+---------------------------------------------------------
ln_gdp_60 | 91 8.645392 .9706411 6.540302 10.37584
ln_gdp_95 | 91 9.193177 1.224778 6.483891 10.93427
ln_gdp_gro~h | 91 .5477844 .6261493 -1.201436 2.185636
ln_inv_gdp | 91 -2.047838 .6532882 -3.981711 -.8885791
ln_ndg | 91 -2.641229 .1272849 -2.939148 -2.379895
* Steady-state production function: Unrestricted Solow model
reg ln_gdp_95 ln_inv_gdp ln_ndg
estat moran, errorlag(Wd2)
Source | SS df MS Number of obs = 91
-------------+---------------------------------- F(2, 88) = 74.02
Model | 84.6761924 2 42.3380962 Prob > F = 0.0000
Residual | 50.331051 88 .571943761 R-squared = 0.6272
-------------+---------------------------------- Adj R-squared = 0.6187
Total | 135.007243 90 1.50008048 Root MSE = .75627
------------------------------------------------------------------------------
ln_gdp_95 | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
ln_inv_gdp | 1.275585 .1251472 10.19 0.000 1.026881 1.524288
ln_ndg | -2.708721 .6423168 -4.22 0.000 -3.985191 -1.432251
_cons | 4.651014 1.772881 2.62 0.010 1.127785 8.174242
------------------------------------------------------------------------------
Moran test for spatial dependence
H0: Error terms are i.i.d.
Errorlags: Wd2
chi2(1) = 38.59
Prob > chi2 = 0.0000
spregress ln_gdp_95 ln_inv_gdp ln_ndg, ml dvarlag(Wd2) ivarlag(Wd2: ln_inv_gdp ln_ndg)
(91 observations)
(91 observations (places) used)
(weighting matrix defines 91 places)
Performing grid search ... finished
Optimizing concentrated log likelihood:
Iteration 0: log likelihood = -73.610496
Iteration 1: log likelihood = -73.506143
Iteration 2: log likelihood = -73.505391
Iteration 3: log likelihood = -73.505391
Optimizing unconcentrated log likelihood:
Iteration 0: log likelihood = -73.505391
Iteration 1: log likelihood = -73.505391 (backed up)
Spatial autoregressive model Number of obs = 91
Maximum likelihood estimates Wald chi2(5) = 448.71
Prob > chi2 = 0.0000
Log likelihood = -73.505391 Pseudo R2 = 0.7060
-------------------------------------------------------------------------------
ln_gdp_95 | Coefficient Std. err. z P>|z| [95% conf. interval]
--------------+----------------------------------------------------------------
ln_gdp_95 |
ln_inv_gdp | .8249832 .1004264 8.21 0.000 .628151 1.021815
ln_ndg | -1.498042 .5671548 -2.64 0.008 -2.609645 -.386439
_cons | .9900386 1.994691 0.50 0.620 -2.919484 4.899562
--------------+----------------------------------------------------------------
Wd2 |
ln_inv_gdp | -.3215858 .2111365 -1.52 0.128 -.7354057 .0922341
ln_ndg | .5693986 .8374482 0.68 0.497 -1.07197 2.210767
ln_gdp_95 | .7394375 .0836932 8.84 0.000 .5754018 .9034731
--------------+----------------------------------------------------------------
var(e.ln_g~95)| .2522834 .0393095 .1858912 .3423879
-------------------------------------------------------------------------------
Wald test of spatial terms: chi2(3) = 113.07 Prob > chi2 = 0.0000
estat impact
progress : 50% 100%
Average impacts Number of obs = 91
------------------------------------------------------------------------------
| Delta-Method
| dy/dx std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
direct |
ln_inv_gdp | .9076282 .1060291 8.56 0.000 .699815 1.115441
ln_ndg | -1.652282 .5752456 -2.87 0.004 -2.779743 -.5248213
-------------+----------------------------------------------------------------
indirect |
ln_inv_gdp | 1.024336 .4936587 2.07 0.038 .0567826 1.991889
ln_ndg | -1.911712 2.395601 -0.80 0.425 -6.607003 2.783579
-------------+----------------------------------------------------------------
total |
ln_inv_gdp | 1.931964 .5368838 3.60 0.000 .879691 2.984237
ln_ndg | -3.563994 2.578084 -1.38 0.167 -8.616947 1.488958
------------------------------------------------------------------------------