WARNING: The directory '/home/jovyan/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pysal 2.5.0 requires python-dateutil<=2.8.0, but you have python-dateutil 2.8.2 which is incompatible.
gstools 1.3.3 requires emcee<4,>=3.0.0, but you have emcee 0.0.0 which is incompatible.
datascience 0.17.2 requires folium>=0.9.1, but you have folium 0.0.0 which is incompatible.
WARNING: You are using pip version 21.2.3; however, version 22.2.1 is available.
You should consider upgrading via the '/home/jovyan/venv/bin/python -m pip install --upgrade pip' command.
WARNING: The directory '/home/jovyan/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Requirement already satisfied: statsmodels in /opt/conda/lib/python3.9/site-packages (0.13.0)
Collecting statsmodels
Downloading statsmodels-0.13.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB)
|████████████████████████████████| 9.9 MB 17.5 MB/s
Requirement already satisfied: pandas>=0.25 in /opt/conda/lib/python3.9/site-packages (from statsmodels) (1.3.4)
Requirement already satisfied: patsy>=0.5.2 in /opt/conda/lib/python3.9/site-packages (from statsmodels) (0.5.2)
Requirement already satisfied: scipy>=1.3 in /home/jovyan/venv/lib/python3.9/site-packages (from statsmodels) (1.9.0)
Collecting packaging>=21.3
Downloading packaging-21.3-py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 20.3 MB/s
Requirement already satisfied: numpy>=1.17 in /opt/conda/lib/python3.9/site-packages (from statsmodels) (1.21.2)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/lib/python3.9/site-packages (from packaging>=21.3->statsmodels) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7.3 in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from pandas>=0.25->statsmodels) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in /opt/conda/lib/python3.9/site-packages (from pandas>=0.25->statsmodels) (2021.3)
Requirement already satisfied: six in /shared-libs/python3.9/py-core/lib/python3.9/site-packages (from patsy>=0.5.2->statsmodels) (1.16.0)
Installing collected packages: packaging, statsmodels
Attempting uninstall: packaging
Found existing installation: packaging 21.0
Not uninstalling packaging at /opt/conda/lib/python3.9/site-packages, outside environment /home/jovyan/venv
Can't uninstall 'packaging'. No files were found to uninstall.
Attempting uninstall: statsmodels
Found existing installation: statsmodels 0.13.0
Not uninstalling statsmodels at /opt/conda/lib/python3.9/site-packages, outside environment /home/jovyan/venv
Can't uninstall 'statsmodels'. No files were found to uninstall.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pysal 2.5.0 requires python-dateutil<=2.8.0, but you have python-dateutil 2.8.2 which is incompatible.
Successfully installed packaging-21.3 statsmodels-0.13.2
WARNING: You are using pip version 21.2.3; however, version 22.2.1 is available.
You should consider upgrading via the '/home/jovyan/venv/bin/python -m pip install --upgrade pip' command.
df: PWT 10.0
0
ABW
Aruba
1
ABW
Aruba
2
ABW
Aruba
3
ABW
Aruba
4
ABW
Aruba
5
ABW
Aruba
6
ABW
Aruba
7
ABW
Aruba
8
ABW
Aruba
9
ABW
Aruba
df_2019log: Determinants of growth 2019 (log form)
69
Aruba
2019
139
Angola
2019
209
Anguilla
2019
279
Albania
2019
349
United Arab Emirates
2019
419
Argentina
2019
489
Armenia
2019
559
Antigua and Barbuda
2019
629
Australia
2019
699
Austria
2019
df2: Wide panel for labour productivity
0
Albania
Europe
1
Algeria
Africa
2
Angola
Africa
3
Anguilla
North America
4
Antigua and Barbuda
North America
5
Argentina
South America
6
Armenia
Asia
7
Aruba
North America
8
Australia
Oceania
9
Austria
Europe
df3: Wide panel for ratio of physical capital
0
Albania
Europe
1
Algeria
Africa
2
Angola
Africa
3
Anguilla
North America
4
Antigua and Barbuda
North America
5
Argentina
South America
6
Armenia
Asia
7
Aruba
North America
8
Australia
Oceania
9
Austria
Europe
df4: Wide panel for human capital
0
Albania
Europe
1
Algeria
Africa
2
Angola
Africa
3
Argentina
South America
4
Armenia
Asia
5
Australia
Oceania
6
Austria
Europe
7
Bahrain
Asia
8
Bangladesh
Asia
9
Barbados
North America
df5: Wide panel for TFP
0
Albania
Europe
1
Algeria
Africa
2
Angola
Africa
3
Argentina
South America
4
Armenia
Asia
5
Australia
Oceania
6
Austria
Europe
7
Bahrain
Asia
8
Bangladesh
Asia
9
Barbados
North America
count
112
112
mean
9.61
9.64
std
1.13
1.13
min
7.37
7.39
25%
8.87
8.86
50%
9.57
9.57
75%
10.43
10.48
max
13.45
13.36
count
156
156
mean
0.32
0.32
std
0.36
0.35
min
-0.86
-0.83
25%
0.09
0.1
50%
0.37
0.37
75%
0.59
0.59
max
0.99
0.96
Evolution of disparities
Sigma convergence: labour productivity (1970-2019)
Beta convergence: labour productivity (1970-2019)
<ipython-input-49-728ef7ab896b>:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df2_drop['g1970_2019'] = df2_drop['2019']-df2_drop['1970']
Beta convergence: labour productivity (1970-1990)
Beta convergence: Labour productivity (1990-2019)
Beta convergence: Physical capital ratio (1970-2019)
<ipython-input-64-ff2d3baa3358>:1: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
Results of Beta convergence
log labour productivity
1970-2019
OLS Regression Results
==============================================================================
Dep. Variable: g1970_2019 R-squared: 0.144
Model: OLS Adj. R-squared: 0.136
Method: Least Squares F-statistic: 18.54
Date: Sat, 30 Jul 2022 Prob (F-statistic): 3.63e-05
Time: 15:23:28 Log-Likelihood: -133.31
No. Observations: 112 AIC: 270.6
Df Residuals: 110 BIC: 276.1
Df Model: 1
Covariance Type: nonrobust
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
const 3.5493 0.650 5.460 0.000 2.261 4.838
1970 -0.2892 0.067 -4.306 0.000 -0.422 -0.156
==============================================================================
Omnibus: 65.956 Durbin-Watson: 1.988
Prob(Omnibus): 0.000 Jarque-Bera (JB): 415.454
Skew: -1.852 Prob(JB): 6.10e-91
Kurtosis: 11.678 Cond. No. 83.8
==============================================================================
Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.