Life Expectancy¶
We are going to take a quick tour of machine learning by working on an example dataset. The mushroom dataset categorizes mushrooms as 'poisonous' or 'edible' and collects several descriptive properties of each mushroom example.
import pandas as pd
import os
from sklearn.linear_model import LinearRegression
from sklearn.metrics import r2_score
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
pd.options.display.max_rows = 20 # Shows 20 rows
pd.options.display.max_columns = 20 # Shows 20 columns
Loading the dataset¶
# These lines would load the data locally
data_root = "./"
filename = "Life_Expectancy_Data.csv"
filepath = os.path.join(data_root, filename)
# We'll fetch it directly from the web
# data_url = "https://aet-cs.github.io/white/ML/lessons/mushroom.csv"
df = pd.read_csv(filepath)
df
Country | Year | Status | Life expectancy | Adult Mortality | infant deaths | Alcohol | percentage expenditure | Hepatitis B | Measles | ... | Polio | Total expenditure | Diphtheria | HIV/AIDS | GDP | Population | thinness 1-19 years | thinness 5-9 years | Income composition of resources | Schooling | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Afghanistan | 2015 | Developing | 65.0 | 263.0 | 62 | 0.01 | 71.279624 | 65.0 | 1154 | ... | 6.0 | 8.16 | 65.0 | 0.1 | 584.259210 | 33736494.0 | 17.2 | 17.3 | 0.479 | 10.1 |
1 | Afghanistan | 2014 | Developing | 59.9 | 271.0 | 64 | 0.01 | 73.523582 | 62.0 | 492 | ... | 58.0 | 8.18 | 62.0 | 0.1 | 612.696514 | 327582.0 | 17.5 | 17.5 | 0.476 | 10.0 |
2 | Afghanistan | 2013 | Developing | 59.9 | 268.0 | 66 | 0.01 | 73.219243 | 64.0 | 430 | ... | 62.0 | 8.13 | 64.0 | 0.1 | 631.744976 | 31731688.0 | 17.7 | 17.7 | 0.470 | 9.9 |
3 | Afghanistan | 2012 | Developing | 59.5 | 272.0 | 69 | 0.01 | 78.184215 | 67.0 | 2787 | ... | 67.0 | 8.52 | 67.0 | 0.1 | 669.959000 | 3696958.0 | 17.9 | 18.0 | 0.463 | 9.8 |
4 | Afghanistan | 2011 | Developing | 59.2 | 275.0 | 71 | 0.01 | 7.097109 | 68.0 | 3013 | ... | 68.0 | 7.87 | 68.0 | 0.1 | 63.537231 | 2978599.0 | 18.2 | 18.2 | 0.454 | 9.5 |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
2933 | Zimbabwe | 2004 | Developing | 44.3 | 723.0 | 27 | 4.36 | 0.000000 | 68.0 | 31 | ... | 67.0 | 7.13 | 65.0 | 33.6 | 454.366654 | 12777511.0 | 9.4 | 9.4 | 0.407 | 9.2 |
2934 | Zimbabwe | 2003 | Developing | 44.5 | 715.0 | 26 | 4.06 | 0.000000 | 7.0 | 998 | ... | 7.0 | 6.52 | 68.0 | 36.7 | 453.351155 | 12633897.0 | 9.8 | 9.9 | 0.418 | 9.5 |
2935 | Zimbabwe | 2002 | Developing | 44.8 | 73.0 | 25 | 4.43 | 0.000000 | 73.0 | 304 | ... | 73.0 | 6.53 | 71.0 | 39.8 | 57.348340 | 125525.0 | 1.2 | 1.3 | 0.427 | 10.0 |
2936 | Zimbabwe | 2001 | Developing | 45.3 | 686.0 | 25 | 1.72 | 0.000000 | 76.0 | 529 | ... | 76.0 | 6.16 | 75.0 | 42.1 | 548.587312 | 12366165.0 | 1.6 | 1.7 | 0.427 | 9.8 |
2937 | Zimbabwe | 2000 | Developing | 46.0 | 665.0 | 24 | 1.68 | 0.000000 | 79.0 | 1483 | ... | 78.0 | 7.10 | 78.0 | 43.5 | 547.358878 | 12222251.0 | 11.0 | 11.2 | 0.434 | 9.8 |
2938 rows × 22 columns
describe
gives a quick overview of each feature
df.describe()
Year | Life expectancy | Adult Mortality | infant deaths | Alcohol | percentage expenditure | Hepatitis B | Measles | BMI | under-five deaths | Polio | Total expenditure | Diphtheria | HIV/AIDS | GDP | Population | thinness 1-19 years | thinness 5-9 years | Income composition of resources | Schooling | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 2938.000000 | 2928.000000 | 2928.000000 | 2938.000000 | 2744.000000 | 2938.000000 | 2385.000000 | 2938.000000 | 2904.000000 | 2938.000000 | 2919.000000 | 2712.00000 | 2919.000000 | 2938.000000 | 2490.000000 | 2.286000e+03 | 2904.000000 | 2904.000000 | 2771.000000 | 2775.000000 |
mean | 2007.518720 | 69.224932 | 164.796448 | 30.303948 | 4.602861 | 738.251295 | 80.940461 | 2419.592240 | 38.321247 | 42.035739 | 82.550188 | 5.93819 | 82.324084 | 1.742103 | 7483.158469 | 1.275338e+07 | 4.839704 | 4.870317 | 0.627551 | 11.992793 |
std | 4.613841 | 9.523867 | 124.292079 | 117.926501 | 4.052413 | 1987.914858 | 25.070016 | 11467.272489 | 20.044034 | 160.445548 | 23.428046 | 2.49832 | 23.716912 | 5.077785 | 14270.169342 | 6.101210e+07 | 4.420195 | 4.508882 | 0.210904 | 3.358920 |
min | 2000.000000 | 36.300000 | 1.000000 | 0.000000 | 0.010000 | 0.000000 | 1.000000 | 0.000000 | 1.000000 | 0.000000 | 3.000000 | 0.37000 | 2.000000 | 0.100000 | 1.681350 | 3.400000e+01 | 0.100000 | 0.100000 | 0.000000 | 0.000000 |
25% | 2004.000000 | 63.100000 | 74.000000 | 0.000000 | 0.877500 | 4.685343 | 77.000000 | 0.000000 | 19.300000 | 0.000000 | 78.000000 | 4.26000 | 78.000000 | 0.100000 | 463.935626 | 1.957932e+05 | 1.600000 | 1.500000 | 0.493000 | 10.100000 |
50% | 2008.000000 | 72.100000 | 144.000000 | 3.000000 | 3.755000 | 64.912906 | 92.000000 | 17.000000 | 43.500000 | 4.000000 | 93.000000 | 5.75500 | 93.000000 | 0.100000 | 1766.947595 | 1.386542e+06 | 3.300000 | 3.300000 | 0.677000 | 12.300000 |
75% | 2012.000000 | 75.700000 | 228.000000 | 22.000000 | 7.702500 | 441.534144 | 97.000000 | 360.250000 | 56.200000 | 28.000000 | 97.000000 | 7.49250 | 97.000000 | 0.800000 | 5910.806335 | 7.420359e+06 | 7.200000 | 7.200000 | 0.779000 | 14.300000 |
max | 2015.000000 | 89.000000 | 723.000000 | 1800.000000 | 17.870000 | 19479.911610 | 99.000000 | 212183.000000 | 87.300000 | 2500.000000 | 99.000000 | 17.60000 | 99.000000 | 50.600000 | 119172.741800 | 1.293859e+09 | 27.700000 | 28.600000 | 0.948000 | 20.700000 |
Data Exploration¶
Show all the columns. Target is 'Life expectancy'
df.columns
Index(['Country', 'Year', 'Status', 'Life expectancy', 'Adult Mortality', 'infant deaths', 'Alcohol', 'percentage expenditure', 'Hepatitis B', 'Measles', 'BMI', 'under-five deaths', 'Polio', 'Total expenditure', 'Diphtheria', 'HIV/AIDS', 'GDP', 'Population', 'thinness 1-19 years', 'thinness 5-9 years', 'Income composition of resources', 'Schooling'], dtype='object')
Get the size of the dataframe. Shape returns (rows, cols)
df.shape
(2938, 22)
Let's get all the data types
df.dtypes
Country object Year int64 Status object Life expectancy float64 Adult Mortality float64 ... Population float64 thinness 1-19 years float64 thinness 5-9 years float64 Income composition of resources float64 Schooling float64 Length: 22, dtype: object
df.hist(target)
array([[<Axes: title={'center': 'Life expectancy'}>]], dtype=object)
Correlation matrix heat map¶
Let's get a quick visual representation of the relationshop between features in this dataset.
df_heat = df.drop(["Country", "Status"], axis = 1)
corr_matrix = df_heat.corr()
plt.figure(figsize=(16, 6))
# define the mask to set the values in the upper triangle to True
mask = np.triu(np.ones_like(corr_matrix, dtype=np.bool))
heatmap = sns.heatmap(corr_matrix, mask=mask, vmin=-1, vmax=1, annot=True, cmap='BrBG')
heatmap.set_title('Life Expectancy Correlation Heatmap', fontdict={'fontsize':14}, pad=16);
plt.show()
Which features seem to be important?
row_filter = abs(corr_matrix[target])>0.1
top_features = pd.DataFrame(corr_matrix[target][row_filter])
top_features.sort_values(by=target)
Life expectancy | |
---|---|
Adult Mortality | -0.696359 |
HIV/AIDS | -0.556556 |
thinness 1-19 years | -0.477183 |
thinness 5-9 years | -0.471584 |
under-five deaths | -0.222529 |
infant deaths | -0.196557 |
Measles | -0.157586 |
Year | 0.170033 |
Total expenditure | 0.218086 |
Hepatitis B | 0.256762 |
percentage expenditure | 0.381864 |
Alcohol | 0.404877 |
GDP | 0.461455 |
Polio | 0.465556 |
Diphtheria | 0.479495 |
BMI | 0.567694 |
Income composition of resources | 0.724776 |
Schooling | 0.751975 |
Life expectancy | 1.000000 |
Data Modeling¶
We're finally ready to do some data modeling using scikit-learn. In this cell we import some methods we'll use, reload the data frame (just to be safe), re-pre-process-it, and one-hot-encode all the categorical variables.
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score, classification_report
Linear Regression¶
def get_data(filename):
df = pd.read_csv(filename)
return df
from sklearn.impute import SimpleImputer
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import OneHotEncoder
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OrdinalEncoder
def pre_process_data(df, one_hot_encode = False):
target = "Life expectancy"
simple_median = SimpleImputer(strategy='median')
simple_most_freq = SimpleImputer(strategy='most_frequent')
num_cols = df.select_dtypes(include=np.number).columns
cat_cols = df.select_dtypes(include=object).columns
df[num_cols] = simple_median.fit_transform(df[num_cols])
df[cat_cols] = simple_most_freq.fit_transform(df[cat_cols])
# O_encoder = OrdinalEncoder()
# df[cat_cols]= O_encoder.fit_transform(df[cat_cols])
if one_hot_encode:
df = pd.get_dummies(df, dtype=int)
return df
def get_test_train(df, test_size = 0.2, random_state = 42):
target = "Life expectancy"
X = df.drop(target, axis=1)
y = df[target]
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=test_size, random_state=random_state)
return X_train, X_test, y_train, y_test
df = get_data(filename)
df = pre_process_data(df, one_hot_encode = True)
X_train, X_test, y_train, y_test = get_test_train(df)
clf = LinearRegression()
model = clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
print(f"Train R-squared = {r2_score(clf.predict(X_train), y_train):5.3}")
print(f"Test R-squared = {r2_score(y_pred, y_test):5.3}")
Train R-squared = 0.962 Test R-squared = 0.964
plt.scatter(y_test, y_pred);
plt.plot([40,90],[40,90],color='red')
plt.title("Predicted LE vs. Real LE")
plt.xlabel("True Life Expectancy")
plt.ylabel("Predicted LE")
Text(0, 0.5, 'Predicted LE')
Advanced Techniques¶
import matplotlib.pyplot as plt
import pandas as pd
# Assuming `df` is your DataFrame with 20 numerical features and 'LifeExpectancy' as the target variable
target = 'Life expectancy'
df = get_data(filename)
df = pre_process_data(df)
features = df.drop(target, axis=1).select_dtypes(include=['number']).columns
# Set up a grid of subplots
num_features = len(features)
num_cols = 5 # Adjust this to your preference
num_rows = (num_features + num_cols - 1) // num_cols # Calculates rows needed
plt.figure(figsize=(15, num_rows * 3))
for i, feature in enumerate(features, 1):
plt.subplot(num_rows, num_cols, i)
plt.scatter(df[feature], df[target], alpha=0.5)
plt.title(f'{feature} vs. LE')
plt.xlabel(feature)
plt.ylabel(target)
plt.tight_layout()
plt.show()
df.hist(figsize=(15,15));
Pre-processing¶
import statsmodels.api as sm
# Add a constant to the model (intercept)
# Fit the OLS model
model = sm.OLS(y_train, X_train).fit()
# Get a summary of the regression
print(model.summary())
OLS Regression Results ============================================================================== Dep. Variable: Life expectancy R-squared: 0.963 Model: OLS Adj. R-squared: 0.960 Method: Least Squares F-statistic: 267.9 Date: Wed, 09 Oct 2024 Prob (F-statistic): 0.00 Time: 13:15:47 Log-Likelihood: -4758.9 No. Observations: 2350 AIC: 9938. Df Residuals: 2140 BIC: 1.115e+04 Df Model: 209 Covariance Type: nonrobust ================================================================================================================================ coef std err t P>|t| [0.025 0.975] -------------------------------------------------------------------------------------------------------------------------------- Year 0.2628 0.012 21.916 0.000 0.239 0.286 Adult Mortality -0.0023 0.001 -4.404 0.000 -0.003 -0.001 infant deaths 0.0780 0.012 6.412 0.000 0.054 0.102 Alcohol -0.0677 0.027 -2.542 0.011 -0.120 -0.015 percentage expenditure 0.0001 5.68e-05 2.340 0.019 2.15e-05 0.000 Hepatitis B -0.0058 0.002 -2.601 0.009 -0.010 -0.001 Measles -9.721e-06 4.84e-06 -2.008 0.045 -1.92e-05 -2.26e-07 BMI -0.0051 0.003 -1.513 0.130 -0.012 0.002 under-five deaths -0.0572 0.008 -6.785 0.000 -0.074 -0.041 Polio 0.0031 0.003 1.203 0.229 -0.002 0.008 Total expenditure -0.0454 0.025 -1.811 0.070 -0.095 0.004 Diphtheria 0.0078 0.003 2.866 0.004 0.002 0.013 HIV/AIDS -0.3209 0.017 -18.573 0.000 -0.355 -0.287 GDP -1.317e-05 8.83e-06 -1.492 0.136 -3.05e-05 4.14e-06 Population -1.166e-09 1.02e-09 -1.138 0.255 -3.18e-09 8.43e-10 thinness 1-19 years 0.0204 0.032 0.645 0.519 -0.042 0.082 thinness 5-9 years 0.0319 0.032 1.012 0.312 -0.030 0.094 Income composition of resources -0.1747 0.511 -0.342 0.733 -1.177 0.828 Schooling 0.1478 0.046 3.234 0.001 0.058 0.237 Country_Afghanistan -12.5602 0.654 -19.206 0.000 -13.843 -11.278 Country_Albania 4.1251 0.546 7.562 0.000 3.055 5.195 Country_Algeria 1.9191 0.572 3.356 0.001 0.798 3.040 Country_Angola -19.1966 0.634 -30.267 0.000 -20.440 -17.953 Country_Antigua and Barbuda 4.8363 0.613 7.896 0.000 3.635 6.038 Country_Argentina 3.8199 0.590 6.479 0.000 2.664 4.976 Country_Armenia 2.4163 0.601 4.018 0.000 1.237 3.596 Country_Australia -11.7984 0.828 -14.243 0.000 -13.423 -10.174 Country_Austria -11.4436 0.922 -12.409 0.000 -13.252 -9.635 Country_Azerbaijan -0.5232 0.536 -0.977 0.329 -1.574 0.527 Country_Bahamas 3.6949 0.627 5.896 0.000 2.466 4.924 Country_Bahrain 4.0994 0.599 6.841 0.000 2.924 5.275 Country_Bangladesh -2.7625 0.704 -3.922 0.000 -4.144 -1.381 Country_Barbados 3.3191 0.612 5.427 0.000 2.120 4.518 Country_Belarus -0.4641 0.634 -0.732 0.465 -1.708 0.780 Country_Belgium -12.1375 0.887 -13.676 0.000 -13.878 -10.397 Country_Belize -1.3670 0.576 -2.373 0.018 -2.497 -0.237 Country_Benin -12.3161 0.594 -20.723 0.000 -13.482 -11.151 Country_Bhutan -5.6748 0.721 -7.868 0.000 -7.089 -4.260 Country_Bolivia (Plurinational State of) -3.0289 0.580 -5.225 0.000 -4.166 -1.892 Country_Bosnia and Herzegovina 5.1239 0.611 8.389 0.000 3.926 6.322 Country_Botswana -9.2538 0.582 -15.888 0.000 -10.396 -8.112 Country_Brazil 1.5147 0.631 2.402 0.016 0.278 2.751 Country_Brunei Darussalam 4.6145 0.537 8.597 0.000 3.562 5.667 Country_Bulgaria -19.4348 0.925 -21.002 0.000 -21.250 -17.620 Country_Burkina Faso -12.7039 0.750 -16.938 0.000 -14.175 -11.233 Country_Burundi -13.3554 0.638 -20.919 0.000 -14.607 -12.103 Country_Cabo Verde 1.3837 0.581 2.381 0.017 0.244 2.523 Country_Cambodia -6.2931 0.614 -10.243 0.000 -7.498 -5.088 Country_Cameroon -13.7371 0.599 -22.928 0.000 -14.912 -12.562 Country_Canada 10.3186 0.646 15.966 0.000 9.051 11.586 Country_Central African Republic -18.2718 0.665 -27.468 0.000 -19.576 -16.967 Country_Chad -17.1495 0.699 -24.536 0.000 -18.520 -15.779 Country_Chile 8.0832 0.595 13.578 0.000 6.916 9.251 Country_China 0.6775 1.005 0.674 0.500 -1.293 2.648 Country_Colombia 2.3495 0.518 4.536 0.000 1.334 3.365 Country_Comoros -8.9342 0.638 -13.996 0.000 -10.186 -7.682 Country_Congo -10.2120 0.578 -17.680 0.000 -11.345 -9.079 Country_Cook Islands -0.3522 1.929 -0.183 0.855 -4.135 3.430 Country_Costa Rica 7.5549 0.510 14.817 0.000 6.555 8.555 Country_Croatia -16.2245 0.946 -17.148 0.000 -18.080 -14.369 Country_Cuba 6.3740 0.523 12.186 0.000 5.348 7.400 Country_Cyprus -12.6044 0.931 -13.539 0.000 -14.430 -10.779 Country_Czechia -15.3735 0.987 -15.578 0.000 -17.309 -13.438 Country_Côte d'Ivoire -18.7114 0.621 -30.153 0.000 -19.928 -17.494 Country_Democratic People's Republic of Korea -2.3606 0.531 -4.446 0.000 -3.402 -1.319 Country_Democratic Republic of the Congo -14.0841 0.704 -20.001 0.000 -15.465 -12.703 Country_Denmark -13.7976 0.859 -16.069 0.000 -15.482 -12.114 Country_Djibouti -8.6067 0.672 -12.802 0.000 -9.925 -7.288 Country_Dominica -0.5753 1.920 -0.300 0.765 -4.341 3.191 Country_Dominican Republic 1.6690 0.540 3.091 0.002 0.610 2.728 Country_Ecuador 3.6705 0.518 7.080 0.000 2.654 4.687 Country_Egypt -0.0465 0.604 -0.077 0.939 -1.232 1.139 Country_El Salvador 0.6517 0.536 1.216 0.224 -0.400 1.703 Country_Equatorial Guinea -12.8233 0.633 -20.267 0.000 -14.064 -11.582 Country_Eritrea -9.2433 0.669 -13.826 0.000 -10.554 -7.932 Country_Estonia 3.7999 0.638 5.960 0.000 2.550 5.050 Country_Ethiopia -7.9965 0.686 -11.649 0.000 -9.343 -6.650 Country_Fiji -2.9123 0.576 -5.053 0.000 -4.043 -1.782 Country_Finland 9.4469 0.584 16.165 0.000 8.301 10.593 Country_France 10.8405 0.672 16.124 0.000 9.522 12.159 Country_Gabon -5.7206 0.571 -10.017 0.000 -6.841 -4.601 Country_Gambia -10.2851 0.564 -18.248 0.000 -11.390 -9.180 Country_Georgia 2.5948 0.535 4.848 0.000 1.545 3.644 Country_Germany -11.6530 0.891 -13.086 0.000 -13.399 -9.907 Country_Ghana -8.8819 0.622 -14.290 0.000 -10.101 -7.663 Country_Greece 10.6086 0.662 16.018 0.000 9.310 11.907 Country_Grenada 1.6641 0.656 2.537 0.011 0.378 2.950 Country_Guatemala 1.6711 0.588 2.843 0.005 0.518 2.824 Country_Guinea -13.2949 0.667 -19.928 0.000 -14.603 -11.987 Country_Guinea-Bissau -13.7809 0.658 -20.955 0.000 -15.071 -12.491 Country_Guyana -4.4222 0.587 -7.534 0.000 -5.573 -3.271 Country_Haiti -9.4562 0.618 -15.312 0.000 -10.667 -8.245 Country_Honduras 2.4061 0.542 4.436 0.000 1.342 3.470 Country_Hungary -18.5916 0.880 -21.119 0.000 -20.318 -16.865 Country_Iceland -10.9866 0.830 -13.242 0.000 -12.614 -9.359 Country_India -8.7540 2.657 -3.295 0.001 -13.965 -3.543 Country_Indonesia -4.3764 0.720 -6.076 0.000 -5.789 -2.964 Country_Iran (Islamic Republic of) 2.2397 0.661 3.390 0.001 0.944 3.535 Country_Iraq -0.6459 0.566 -1.140 0.254 -1.757 0.465 Country_Ireland -13.0366 0.854 -15.262 0.000 -14.712 -11.361 Country_Israel 9.8839 0.542 18.237 0.000 8.821 10.947 Country_Italy -10.2338 0.897 -11.414 0.000 -11.992 -8.476 Country_Jamaica 3.7132 0.519 7.154 0.000 2.695 4.731 Country_Japan -10.7261 0.915 -11.719 0.000 -12.521 -8.931 Country_Jordan 1.6096 0.628 2.565 0.010 0.379 2.840 Country_Kazakhstan -4.1239 0.530 -7.783 0.000 -5.163 -3.085 Country_Kenya -9.8681 0.701 -14.078 0.000 -11.243 -8.494 Country_Kiribati -5.8018 0.560 -10.359 0.000 -6.900 -4.703 Country_Kuwait 2.3244 0.572 4.060 0.000 1.202 3.447 Country_Kyrgyzstan -1.7812 0.573 -3.108 0.002 -2.905 -0.657 Country_Lao People's Democratic Republic -8.6250 0.652 -13.220 0.000 -9.904 -7.346 Country_Latvia -19.5572 0.913 -21.427 0.000 -21.347 -17.767 Country_Lebanon 2.7358 0.551 4.968 0.000 1.656 3.816 Country_Lesotho -13.7909 0.687 -20.083 0.000 -15.138 -12.444 Country_Liberia -11.8216 0.637 -18.548 0.000 -13.071 -10.572 Country_Libya 0.8550 0.561 1.524 0.128 -0.245 1.955 Country_Lithuania -19.8510 0.910 -21.818 0.000 -21.635 -18.067 Country_Luxembourg -12.1310 0.936 -12.957 0.000 -13.967 -10.295 Country_Madagascar -7.3647 0.611 -12.063 0.000 -8.562 -6.167 Country_Malawi -14.5938 0.624 -23.372 0.000 -15.818 -13.369 Country_Malaysia 2.0359 0.544 3.741 0.000 0.969 3.103 Country_Maldives 3.8868 0.708 5.489 0.000 2.498 5.276 Country_Mali -13.7600 0.614 -22.421 0.000 -14.964 -12.556 Country_Malta -12.2713 0.879 -13.955 0.000 -13.996 -10.547 Country_Marshall Islands 1.6728 2.048 0.817 0.414 -2.343 5.688 Country_Mauritania -7.1774 0.592 -12.131 0.000 -8.338 -6.017 Country_Mauritius 1.1115 0.537 2.071 0.038 0.059 2.164 Country_Mexico 4.5619 0.542 8.421 0.000 3.500 5.624 Country_Micronesia (Federated States of) -2.1359 0.589 -3.624 0.000 -3.292 -0.980 Country_Monaco -0.6930 1.920 -0.361 0.718 -4.459 3.073 Country_Mongolia -5.0890 0.535 -9.510 0.000 -6.138 -4.040 Country_Montenegro 3.3868 0.578 5.856 0.000 2.253 4.521 Country_Morocco 0.6693 0.528 1.268 0.205 -0.366 1.705 Country_Mozambique -12.4587 0.707 -17.622 0.000 -13.845 -11.072 Country_Myanmar -7.0211 0.641 -10.952 0.000 -8.278 -5.764 Country_Namibia -5.9434 0.622 -9.559 0.000 -7.163 -4.724 Country_Nauru 0.1517 1.936 0.078 0.938 -3.645 3.949 Country_Nepal -5.2503 0.650 -8.079 0.000 -6.525 -3.976 Country_Netherlands -12.2373 0.875 -13.984 0.000 -13.953 -10.521 Country_New Zealand -11.9634 0.856 -13.975 0.000 -13.642 -10.285 Country_Nicaragua 3.0351 0.577 5.265 0.000 1.905 4.166 Country_Niger -10.2640 0.734 -13.990 0.000 -11.703 -8.825 Country_Nigeria -9.6062 1.323 -7.262 0.000 -12.200 -7.012 Country_Niue -0.2211 1.927 -0.115 0.909 -3.999 3.557 Country_Norway -11.7505 0.878 -13.383 0.000 -13.472 -10.029 Country_Oman 3.1708 0.541 5.857 0.000 2.109 4.233 Country_Pakistan -8.7646 1.064 -8.236 0.000 -10.851 -6.678 Country_Palau -0.1512 1.928 -0.078 0.937 -3.932 3.629 Country_Panama 5.7315 0.527 10.877 0.000 4.698 6.765 Country_Papua New Guinea -8.1734 0.577 -14.162 0.000 -9.305 -7.042 Country_Paraguay 2.3642 0.539 4.387 0.000 1.307 3.421 Country_Peru 2.5897 0.538 4.809 0.000 1.534 3.646 Country_Philippines -3.6853 0.618 -5.965 0.000 -4.897 -2.474 Country_Poland -17.0092 0.889 -19.132 0.000 -18.753 -15.266 Country_Portugal -12.5562 0.908 -13.834 0.000 -14.336 -10.776 Country_Qatar 5.7333 0.633 9.062 0.000 4.493 6.974 Country_Republic of Korea 9.5900 0.650 14.751 0.000 8.315 10.865 Country_Republic of Moldova 0.0469 0.605 0.077 0.938 -1.140 1.234 Country_Romania -18.5794 0.950 -19.564 0.000 -20.442 -16.717 Country_Russian Federation -2.7774 0.559 -4.967 0.000 -3.874 -1.681 Country_Rwanda -9.7279 0.563 -17.272 0.000 -10.832 -8.623 Country_Saint Kitts and Nevis -0.3742 1.929 -0.194 0.846 -4.158 3.409 Country_Saint Lucia 3.0517 0.573 5.328 0.000 1.928 4.175 Country_Saint Vincent and the Grenadines 3.0522 0.577 5.289 0.000 1.921 4.184 Country_Samoa 3.2221 0.590 5.458 0.000 2.064 4.380 Country_San Marino 1.281e-15 3.25e-16 3.945 0.000 6.44e-16 1.92e-15 Country_Sao Tome and Principe -5.5226 0.570 -9.692 0.000 -6.640 -4.405 Country_Saudi Arabia 1.5367 0.542 2.836 0.005 0.474 2.599 Country_Senegal -7.5512 0.613 -12.318 0.000 -8.753 -6.349 Country_Serbia 3.0942 0.570 5.424 0.000 1.976 4.213 Country_Seychelles 1.1472 0.510 2.247 0.025 0.146 2.148 Country_Sierra Leone -23.4103 0.595 -39.341 0.000 -24.577 -22.243 Country_Singapore -11.7512 0.895 -13.130 0.000 -13.506 -9.996 Country_Slovakia -17.6592 0.932 -18.956 0.000 -19.486 -15.832 Country_Slovenia -12.7290 0.912 -13.962 0.000 -14.517 -10.941 Country_Solomon Islands -2.8756 0.628 -4.575 0.000 -4.108 -1.643 Country_Somalia -16.4311 0.613 -26.798 0.000 -17.634 -15.229 Country_South Africa -7.2253 0.676 -10.695 0.000 -8.550 -5.900 Country_South Sudan -13.5777 0.736 -18.449 0.000 -15.021 -12.134 Country_Spain -11.2193 0.861 -13.024 0.000 -12.909 -9.530 Country_Sri Lanka 1.2581 0.605 2.080 0.038 0.072 2.444 Country_Sudan -7.4963 0.620 -12.091 0.000 -8.712 -6.280 Country_Suriname -0.2626 0.601 -0.437 0.662 -1.442 0.917 Country_Swaziland -8.2209 0.820 -10.030 0.000 -9.828 -6.613 Country_Sweden -10.4318 0.852 -12.240 0.000 -12.103 -8.760 Country_Switzerland -10.8080 0.938 -11.521 0.000 -12.648 -8.968 Country_Syrian Arab Republic -0.0209 0.563 -0.037 0.970 -1.125 1.083 Country_Tajikistan -4.5686 0.537 -8.503 0.000 -5.622 -3.515 Country_Thailand 1.7351 0.639 2.716 0.007 0.482 2.988 Country_The former Yugoslav republic of Macedonia 2.9756 0.615 4.836 0.000 1.769 4.182 Country_Timor-Leste -7.1945 0.647 -11.123 0.000 -8.463 -5.926 Country_Togo -12.9612 0.604 -21.457 0.000 -14.146 -11.777 Country_Tonga 1.0971 0.596 1.841 0.066 -0.072 2.266 Country_Trinidad and Tobago 0.2871 0.559 0.514 0.607 -0.808 1.383 Country_Tunisia 2.5458 0.555 4.585 0.000 1.457 3.635 Country_Turkey 2.5928 0.530 4.892 0.000 1.553 3.632 Country_Turkmenistan -6.1294 0.621 -9.877 0.000 -7.346 -4.912 Country_Tuvalu -2.723e-07 3.19e-08 -8.533 0.000 -3.35e-07 -2.1e-07 Country_Uganda -11.1372 0.692 -16.091 0.000 -12.495 -9.780 Country_Ukraine -0.7919 0.523 -1.514 0.130 -1.818 0.234 Country_United Arab Emirates 4.1369 0.562 7.365 0.000 3.035 5.238 Country_United Kingdom of Great Britain and Northern Ireland -11.2227 0.950 -11.813 0.000 -13.086 -9.360 Country_United Republic of Tanzania -12.0977 0.589 -20.550 0.000 -13.252 -10.943 Country_United States of America -14.2563 0.974 -14.634 0.000 -16.167 -12.346 Country_Uruguay 5.1690 0.553 9.350 0.000 4.085 6.253 Country_Uzbekistan -3.2687 0.553 -5.914 0.000 -4.353 -2.185 Country_Vanuatu 0.6602 0.568 1.162 0.245 -0.454 1.774 Country_Venezuela (Bolivarian Republic of) 2.8068 0.589 4.764 0.000 1.651 3.962 Country_Viet Nam 2.7917 0.609 4.583 0.000 1.597 3.986 Country_Yemen -7.2082 0.655 -11.003 0.000 -8.493 -5.924 Country_Zambia -12.2124 0.573 -21.315 0.000 -13.336 -11.089 Country_Zimbabwe -12.9092 0.694 -18.610 0.000 -14.270 -11.549 Status_Developed -436.0261 22.964 -18.987 0.000 -481.060 -390.992 Status_Developing -457.7453 23.650 -19.355 0.000 -504.125 -411.365 ============================================================================== Omnibus: 570.909 Durbin-Watson: 1.911 Prob(Omnibus): 0.000 Jarque-Bera (JB): 16400.405 Skew: 0.503 Prob(JB): 0.00 Kurtosis: 15.903 Cond. No. 8.21e+24 ============================================================================== Notes: [1] Standard Errors assume that the covariance matrix of the errors is correctly specified. [2] The smallest eigenvalue is 8.56e-32. This might indicate that there are strong multicollinearity problems or that the design matrix is singular.
# Extract the summary table as a DataFrame
summary_table = model.summary2().tables[1] # tables[1] is the coefficients table in summary2()
# Sort by p-values (for example)
sorted_summary = summary_table.sort_values(by='t')
# Set display options to prevent truncation
pd.options.display.max_rows = None # Shows all rows
pd.options.display.max_columns = None # Shows all columns
sorted_summary
Coef. | Std.Err. | t | P>|t| | [0.025 | 0.975] | |
---|---|---|---|---|---|---|
Country_Sierra Leone | -2.384615e+01 | 7.024424e-01 | -33.947488 | 1.836603e-202 | -2.522370e+01 | -2.246861e+01 |
Country_Lesotho | -2.098876e+01 | 6.818324e-01 | -30.782881 | 1.390266e-172 | -2.232589e+01 | -1.965164e+01 |
Country_Swaziland | -1.954167e+01 | 6.639749e-01 | -29.431346 | 3.709886e-160 | -2.084378e+01 | -1.823957e+01 |
Country_Malawi | -1.955037e+01 | 6.836621e-01 | -28.596539 | 1.340917e-152 | -2.089108e+01 | -1.820966e+01 |
Country_Zimbabwe | -1.953323e+01 | 7.054177e-01 | -27.690310 | 1.665289e-144 | -2.091661e+01 | -1.814986e+01 |
Country_Central African Republic | -2.110985e+01 | 7.715096e-01 | -27.361745 | 1.336742e-141 | -2.262284e+01 | -1.959686e+01 |
Country_Côte d'Ivoire | -1.929140e+01 | 7.193652e-01 | -26.817258 | 7.989231e-137 | -2.070213e+01 | -1.788067e+01 |
Country_Angola | -1.965137e+01 | 7.382675e-01 | -26.618226 | 4.332100e-135 | -2.109917e+01 | -1.820357e+01 |
Country_Zambia | -1.577182e+01 | 6.545813e-01 | -24.094511 | 1.076908e-113 | -1.705550e+01 | -1.448814e+01 |
Country_Lithuania | -2.320593e+01 | 9.969035e-01 | -23.278007 | 4.992191e-107 | -2.516093e+01 | -2.125093e+01 |
Country_Latvia | -2.308448e+01 | 9.966439e-01 | -23.162217 | 4.292374e-106 | -2.503897e+01 | -2.112999e+01 |
Country_Chad | -1.885356e+01 | 8.140584e-01 | -23.159955 | 4.476320e-106 | -2.044998e+01 | -1.725713e+01 |
Country_Hungary | -2.195012e+01 | 9.568583e-01 | -22.939778 | 2.629772e-104 | -2.382659e+01 | -2.007365e+01 |
Country_Somalia | -1.595300e+01 | 6.996920e-01 | -22.800030 | 3.447001e-103 | -1.732515e+01 | -1.458085e+01 |
Country_Bulgaria | -2.292869e+01 | 1.009367e+00 | -22.715916 | 1.614692e-102 | -2.490813e+01 | -2.094925e+01 |
Country_Botswana | -1.399261e+01 | 6.287431e-01 | -22.254894 | 7.191876e-99 | -1.522562e+01 | -1.275960e+01 |
Country_Cameroon | -1.554462e+01 | 7.000790e-01 | -22.204089 | 1.803475e-98 | -1.691752e+01 | -1.417171e+01 |
Status_Developing | -5.726251e+02 | 2.611777e+01 | -21.924733 | 2.762853e-96 | -6.238439e+02 | -5.214062e+02 |
Country_Mozambique | -1.698469e+01 | 7.816731e-01 | -21.728638 | 9.223281e-95 | -1.851761e+01 | -1.545177e+01 |
Status_Developed | -5.474589e+02 | 2.533915e+01 | -21.605259 | 8.298853e-94 | -5.971509e+02 | -4.977670e+02 |
Country_Romania | -2.201775e+01 | 1.039419e+00 | -21.182735 | 1.445750e-90 | -2.405612e+01 | -1.997937e+01 |
Country_Poland | -2.043647e+01 | 9.699842e-01 | -21.068873 | 1.062702e-89 | -2.233868e+01 | -1.853426e+01 |
Country_Slovakia | -2.053319e+01 | 9.943115e-01 | -20.650659 | 1.520857e-86 | -2.248310e+01 | -1.858327e+01 |
Country_Guinea-Bissau | -1.553999e+01 | 7.674100e-01 | -20.249917 | 1.467067e-83 | -1.704494e+01 | -1.403504e+01 |
Country_Mali | -1.456148e+01 | 7.210360e-01 | -20.195226 | 3.721311e-83 | -1.597549e+01 | -1.314748e+01 |
Country_Togo | -1.408157e+01 | 7.092691e-01 | -19.853632 | 1.198843e-80 | -1.547250e+01 | -1.269064e+01 |
Country_United Republic of Tanzania | -1.350178e+01 | 6.803865e-01 | -19.844282 | 1.402816e-80 | -1.483607e+01 | -1.216749e+01 |
Country_Croatia | -1.973008e+01 | 1.031898e+00 | -19.120184 | 2.312525e-75 | -2.175371e+01 | -1.770645e+01 |
Country_Equatorial Guinea | -1.418284e+01 | 7.418940e-01 | -19.117065 | 2.433683e-75 | -1.563774e+01 | -1.272793e+01 |
Country_Burundi | -1.430045e+01 | 7.505235e-01 | -19.053966 | 6.829927e-75 | -1.577228e+01 | -1.282862e+01 |
Country_Benin | -1.286127e+01 | 6.992442e-01 | -18.393099 | 2.915920e-70 | -1.423254e+01 | -1.149000e+01 |
Country_Denmark | -1.719045e+01 | 9.420532e-01 | -18.247856 | 2.928719e-69 | -1.903789e+01 | -1.534302e+01 |
Country_Guinea | -1.396273e+01 | 7.769852e-01 | -17.970394 | 2.315181e-67 | -1.548646e+01 | -1.243901e+01 |
Country_Democratic Republic of the Congo | -1.404247e+01 | 7.991430e-01 | -17.571908 | 1.129680e-64 | -1.560964e+01 | -1.247529e+01 |
Country_Ireland | -1.641810e+01 | 9.391121e-01 | -17.482573 | 4.462015e-64 | -1.825976e+01 | -1.457643e+01 |
Country_South Sudan | -1.473396e+01 | 8.460699e-01 | -17.414593 | 1.264681e-63 | -1.639317e+01 | -1.307476e+01 |
Country_Czechia | -1.830798e+01 | 1.054105e+00 | -17.368271 | 2.567612e-63 | -2.037516e+01 | -1.624081e+01 |
Country_Afghanistan | -1.244918e+01 | 7.229727e-01 | -17.219437 | 2.474866e-62 | -1.386699e+01 | -1.103138e+01 |
Country_United States of America | -1.765947e+01 | 1.035835e+00 | -17.048538 | 3.278035e-61 | -1.969081e+01 | -1.562812e+01 |
Country_South Africa | -1.228523e+01 | 7.221881e-01 | -17.011122 | 5.756352e-61 | -1.370149e+01 | -1.086897e+01 |
Country_Liberia | -1.251050e+01 | 7.471688e-01 | -16.743867 | 3.125821e-59 | -1.397575e+01 | -1.104524e+01 |
Country_Uganda | -1.321571e+01 | 7.893853e-01 | -16.741772 | 3.224623e-59 | -1.476375e+01 | -1.166767e+01 |
Country_Malta | -1.612846e+01 | 9.656338e-01 | -16.702460 | 5.779390e-59 | -1.802214e+01 | -1.423478e+01 |
Country_Rwanda | -1.107606e+01 | 6.649750e-01 | -16.656350 | 1.144249e-58 | -1.238012e+01 | -9.771991e+00 |
Country_Australia | -1.512439e+01 | 9.093915e-01 | -16.631334 | 1.656495e-58 | -1.690778e+01 | -1.334101e+01 |
Country_New Zealand | -1.549884e+01 | 9.374598e-01 | -16.532805 | 7.083176e-58 | -1.733727e+01 | -1.366041e+01 |
Country_Netherlands | -1.579157e+01 | 9.629190e-01 | -16.399687 | 4.991373e-57 | -1.767993e+01 | -1.390322e+01 |
Country_Portugal | -1.623373e+01 | 9.933403e-01 | -16.342570 | 1.149358e-56 | -1.818175e+01 | -1.428572e+01 |
Country_Slovenia | -1.627526e+01 | 9.980914e-01 | -16.306385 | 1.947279e-56 | -1.823259e+01 | -1.431793e+01 |
Country_Congo | -1.101422e+01 | 6.797341e-01 | -16.203725 | 8.648265e-56 | -1.234723e+01 | -9.681216e+00 |
Country_Belgium | -1.571360e+01 | 9.743988e-01 | -16.126459 | 2.643485e-55 | -1.762447e+01 | -1.380273e+01 |
Country_Cyprus | -1.636576e+01 | 1.018493e+00 | -16.068600 | 6.086419e-55 | -1.836310e+01 | -1.436842e+01 |
Country_Singapore | -1.586329e+01 | 9.929674e-01 | -15.975641 | 2.312848e-54 | -1.781057e+01 | -1.391601e+01 |
Country_Iceland | -1.451723e+01 | 9.108647e-01 | -15.937861 | 3.972229e-54 | -1.630351e+01 | -1.273096e+01 |
Country_Norway | -1.527585e+01 | 9.614697e-01 | -15.888021 | 8.095287e-54 | -1.716136e+01 | -1.339034e+01 |
Country_Spain | -1.485810e+01 | 9.458400e-01 | -15.708889 | 1.031069e-52 | -1.671296e+01 | -1.300323e+01 |
Country_Gambia | -1.047816e+01 | 6.684227e-01 | -15.675954 | 1.642058e-52 | -1.178899e+01 | -9.167338e+00 |
Country_Burkina Faso | -1.335458e+01 | 8.560108e-01 | -15.600951 | 4.724924e-52 | -1.503328e+01 | -1.167588e+01 |
Country_Kenya | -1.234284e+01 | 7.986110e-01 | -15.455380 | 3.633338e-51 | -1.390897e+01 | -1.077670e+01 |
Country_Germany | -1.508492e+01 | 9.778896e-01 | -15.425994 | 5.474593e-51 | -1.700263e+01 | -1.316721e+01 |
Country_Luxembourg | -1.555601e+01 | 1.024337e+00 | -15.186417 | 1.512976e-49 | -1.756481e+01 | -1.354721e+01 |
Country_Sweden | -1.407837e+01 | 9.374418e-01 | -15.017857 | 1.524893e-48 | -1.591676e+01 | -1.223997e+01 |
Country_Austria | -1.487461e+01 | 1.015020e+00 | -14.654506 | 2.068167e-46 | -1.686514e+01 | -1.288408e+01 |
Country_Haiti | -1.047507e+01 | 7.208575e-01 | -14.531400 | 1.067751e-45 | -1.188872e+01 | -9.061415e+00 |
Country_Japan | -1.438887e+01 | 1.002513e+00 | -14.352799 | 1.132490e-44 | -1.635488e+01 | -1.242287e+01 |
Country_United Kingdom of Great Britain and Northern Ireland | -1.434710e+01 | 1.012838e+00 | -14.165244 | 1.317882e-43 | -1.633335e+01 | -1.236085e+01 |
Country_Italy | -1.390844e+01 | 9.876524e-01 | -14.082323 | 3.867585e-43 | -1.584530e+01 | -1.197158e+01 |
Country_Switzerland | -1.411181e+01 | 1.008644e+00 | -13.990877 | 1.260273e-42 | -1.608984e+01 | -1.213379e+01 |
Country_Ghana | -9.714084e+00 | 7.231396e-01 | -13.433206 | 1.476320e-39 | -1.113221e+01 | -8.295954e+00 |
Country_Namibia | -9.399137e+00 | 7.010576e-01 | -13.407083 | 2.043533e-39 | -1.077396e+01 | -8.024312e+00 |
Country_Papua New Guinea | -9.037959e+00 | 6.769572e-01 | -13.350859 | 4.106926e-39 | -1.036552e+01 | -7.710397e+00 |
Country_Comoros | -9.220819e+00 | 6.917821e-01 | -13.329079 | 5.378435e-39 | -1.057745e+01 | -7.864183e+00 |
Country_Djibouti | -1.000317e+01 | 7.846496e-01 | -12.748578 | 6.216133e-36 | -1.154192e+01 | -8.464412e+00 |
Country_Niger | -1.058867e+01 | 8.399098e-01 | -12.606909 | 3.338073e-35 | -1.223579e+01 | -8.941542e+00 |
Country_Eritrea | -9.592419e+00 | 7.668567e-01 | -12.508751 | 1.059761e-34 | -1.109628e+01 | -8.088557e+00 |
Country_Gabon | -7.835945e+00 | 6.636000e-01 | -11.808235 | 3.221754e-31 | -9.137313e+00 | -6.534577e+00 |
Country_Sudan | -8.065745e+00 | 6.838239e-01 | -11.795060 | 3.731982e-31 | -9.406774e+00 | -6.724716e+00 |
Country_Lao People's Democratic Republic | -8.208108e+00 | 7.050813e-01 | -11.641364 | 2.052262e-30 | -9.590824e+00 | -6.825392e+00 |
Country_Senegal | -7.928504e+00 | 7.017575e-01 | -11.298068 | 8.615295e-29 | -9.304702e+00 | -6.552306e+00 |
Country_Mauritania | -7.841409e+00 | 6.956110e-01 | -11.272693 | 1.131258e-28 | -9.205553e+00 | -6.477265e+00 |
Country_Ethiopia | -8.897927e+00 | 7.916450e-01 | -11.239795 | 1.609065e-28 | -1.045040e+01 | -7.345454e+00 |
Country_Madagascar | -7.629826e+00 | 6.989008e-01 | -10.916894 | 4.871133e-27 | -9.000421e+00 | -6.259230e+00 |
Country_Kiribati | -6.561295e+00 | 6.186039e-01 | -10.606618 | 1.188487e-25 | -7.774423e+00 | -5.348168e+00 |
Country_Timor-Leste | -7.116939e+00 | 7.140851e-01 | -9.966514 | 6.683709e-23 | -8.517312e+00 | -5.716566e+00 |
Country_Turkmenistan | -6.679133e+00 | 6.839479e-01 | -9.765559 | 4.538208e-22 | -8.020405e+00 | -5.337861e+00 |
Country_Myanmar | -6.931763e+00 | 7.198311e-01 | -9.629707 | 1.624277e-21 | -8.343404e+00 | -5.520121e+00 |
Country_Cambodia | -6.552976e+00 | 6.999577e-01 | -9.361961 | 1.912867e-20 | -7.925644e+00 | -5.180308e+00 |
Country_Yemen | -6.617634e+00 | 7.158515e-01 | -9.244424 | 5.536898e-20 | -8.021472e+00 | -5.213797e+00 |
Country_Sao Tome and Principe | -5.921592e+00 | 6.502695e-01 | -9.106366 | 1.899853e-19 | -7.196818e+00 | -4.646366e+00 |
Country_Mongolia | -5.410840e+00 | 5.955876e-01 | -9.084877 | 2.298316e-19 | -6.578830e+00 | -4.242849e+00 |
Country_Tajikistan | -4.906333e+00 | 5.979946e-01 | -8.204643 | 3.944642e-16 | -6.079044e+00 | -3.733621e+00 |
Country_Pakistan | -9.270009e+00 | 1.153261e+00 | -8.038083 | 1.493826e-15 | -1.153164e+01 | -7.008379e+00 |
under-five deaths | -6.571412e-02 | 9.046744e-03 | -7.263842 | 5.244266e-13 | -8.345544e-02 | -4.797279e-02 |
Country_Kazakhstan | -4.162719e+00 | 5.900547e-01 | -7.054803 | 2.324707e-12 | -5.319860e+00 | -3.005579e+00 |
Country_Nigeria | -1.012007e+01 | 1.442564e+00 | -7.015336 | 3.065596e-12 | -1.294905e+01 | -7.291098e+00 |
Country_Nepal | -4.951988e+00 | 7.063913e-01 | -7.010262 | 3.176268e-12 | -6.337273e+00 | -3.566703e+00 |
Country_Guyana | -4.588058e+00 | 6.678301e-01 | -6.870097 | 8.381709e-12 | -5.897722e+00 | -3.278394e+00 |
Country_Bhutan | -5.300396e+00 | 7.860718e-01 | -6.742890 | 1.990756e-11 | -6.841940e+00 | -3.758852e+00 |
Adult Mortality | -3.694340e-03 | 5.511215e-04 | -6.703312 | 2.597701e-11 | -4.775129e-03 | -2.613550e-03 |
Country_San Marino | -8.029090e-10 | 1.233071e-10 | -6.511455 | 9.246181e-11 | -1.044723e-09 | -5.610946e-10 |
Country_Indonesia | -4.874471e+00 | 7.762641e-01 | -6.279397 | 4.103791e-10 | -6.396782e+00 | -3.352160e+00 |
Country_Uzbekistan | -3.677017e+00 | 5.998464e-01 | -6.129931 | 1.043807e-09 | -4.853360e+00 | -2.500675e+00 |
Country_Philippines | -3.769967e+00 | 6.801129e-01 | -5.543149 | 3.337141e-08 | -5.103719e+00 | -2.436216e+00 |
Country_Solomon Islands | -3.663782e+00 | 6.927873e-01 | -5.288465 | 1.359100e-07 | -5.022388e+00 | -2.305175e+00 |
Country_Fiji | -3.180234e+00 | 6.378811e-01 | -4.985623 | 6.672689e-07 | -4.431166e+00 | -1.929303e+00 |
Country_Bolivia (Plurinational State of) | -2.847983e+00 | 6.299739e-01 | -4.520796 | 6.497113e-06 | -4.083408e+00 | -1.612558e+00 |
Country_Russian Federation | -2.629292e+00 | 6.056501e-01 | -4.341273 | 1.482625e-05 | -3.817017e+00 | -1.441568e+00 |
Alcohol | -1.109159e-01 | 2.870888e-02 | -3.863472 | 1.151116e-04 | -1.672161e-01 | -5.461572e-02 |
Country_Bangladesh | -2.898584e+00 | 7.765957e-01 | -3.732423 | 1.945924e-04 | -4.421545e+00 | -1.375623e+00 |
Country_Micronesia (Federated States of) | -2.258458e+00 | 6.503075e-01 | -3.472908 | 5.250809e-04 | -3.533758e+00 | -9.831573e-01 |
Country_Democratic People's Republic of Korea | -1.975778e+00 | 5.928284e-01 | -3.332799 | 8.744110e-04 | -3.138358e+00 | -8.131981e-01 |
Country_India | -9.164212e+00 | 2.856694e+00 | -3.207978 | 1.356466e-03 | -1.476640e+01 | -3.562027e+00 |
Hepatitis B | -6.809741e-03 | 2.408427e-03 | -2.827463 | 4.735471e-03 | -1.153284e-02 | -2.086638e-03 |
Country_Kyrgyzstan | -1.676051e+00 | 6.283511e-01 | -2.667380 | 7.702130e-03 | -2.908294e+00 | -4.438089e-01 |
Country_Belize | -1.599300e+00 | 6.333224e-01 | -2.525254 | 1.163315e-02 | -2.841291e+00 | -3.573084e-01 |
logGDP | -9.947509e-02 | 4.910909e-02 | -2.025594 | 4.293027e-02 | -1.957816e-01 | -3.168566e-03 |
Country_Azerbaijan | -1.036844e+00 | 5.955634e-01 | -1.740947 | 8.183652e-02 | -2.204788e+00 | 1.310989e-01 |
BMI | -6.160831e-03 | 3.631022e-03 | -1.696721 | 8.989482e-02 | -1.328153e-02 | 9.598678e-04 |
Measles | -8.519964e-06 | 5.207132e-06 | -1.636211 | 1.019426e-01 | -1.873153e-05 | 1.691602e-06 |
Country_Ukraine | -9.041591e-01 | 5.849994e-01 | -1.545573 | 1.223556e-01 | -2.051386e+00 | 2.430675e-01 |
Population | -1.685098e-09 | 1.102843e-09 | -1.527959 | 1.266706e-01 | -3.847853e-09 | 4.776570e-10 |
Country_Iraq | -9.245128e-01 | 6.235236e-01 | -1.482723 | 1.382952e-01 | -2.147288e+00 | 2.982625e-01 |
Total expenditure | -3.698317e-02 | 2.695711e-02 | -1.371926 | 1.702302e-01 | -8.984804e-02 | 1.588170e-02 |
Country_Suriname | -6.893467e-01 | 6.736866e-01 | -1.023245 | 3.063075e-01 | -2.010495e+00 | 6.318020e-01 |
Income composition of resources | -5.059445e-01 | 5.503265e-01 | -0.919353 | 3.580145e-01 | -1.585175e+00 | 5.732861e-01 |
Country_Dominica | -1.191247e+00 | 2.069758e+00 | -0.575549 | 5.649806e-01 | -5.250195e+00 | 2.867700e+00 |
Country_Palau | -1.025232e+00 | 2.079517e+00 | -0.493014 | 6.220531e-01 | -5.103317e+00 | 3.052854e+00 |
Country_Nauru | -9.229065e-01 | 2.091462e+00 | -0.441273 | 6.590597e-01 | -5.024417e+00 | 3.178604e+00 |
Country_Monaco | -8.815249e-01 | 2.068923e+00 | -0.426079 | 6.700931e-01 | -4.938835e+00 | 3.175785e+00 |
thinness 5-9 years | -1.334143e-02 | 3.386089e-02 | -0.394007 | 6.936150e-01 | -7.974512e-02 | 5.306225e-02 |
Country_China | -4.095934e-01 | 1.086974e+00 | -0.376820 | 7.063449e-01 | -2.541229e+00 | 1.722042e+00 |
Country_Cook Islands | -7.000490e-01 | 2.077959e+00 | -0.336893 | 7.362309e-01 | -4.775079e+00 | 3.374981e+00 |
Country_Niue | -6.049927e-01 | 2.075671e+00 | -0.291468 | 7.707213e-01 | -4.675535e+00 | 3.465550e+00 |
Country_Belarus | -1.801282e-01 | 6.971873e-01 | -0.258364 | 7.961508e-01 | -1.547364e+00 | 1.187107e+00 |
Country_Vanuatu | -1.509672e-01 | 6.306616e-01 | -0.239379 | 8.108346e-01 | -1.387741e+00 | 1.085806e+00 |
Country_Saint Kitts and Nevis | -1.618836e-01 | 2.080496e+00 | -0.077810 | 9.379864e-01 | -4.241888e+00 | 3.918120e+00 |
Country_Egypt | -3.241900e-02 | 6.679046e-01 | -0.048538 | 9.612917e-01 | -1.342229e+00 | 1.277391e+00 |
Country_Marshall Islands | -1.036425e-01 | 2.206165e+00 | -0.046979 | 9.625347e-01 | -4.430092e+00 | 4.222807e+00 |
Country_Syrian Arab Republic | -1.121379e-02 | 6.185179e-01 | -0.018130 | 9.855368e-01 | -1.224173e+00 | 1.201745e+00 |
thinness 1-19 years | 1.168155e-03 | 3.406010e-02 | 0.034297 | 9.726436e-01 | -6.562620e-02 | 6.796251e-02 |
Country_El Salvador | 1.220767e-01 | 5.932056e-01 | 0.205792 | 8.369733e-01 | -1.041243e+00 | 1.285396e+00 |
Country_Trinidad and Tobago | 1.778183e-01 | 6.293880e-01 | 0.282526 | 7.775677e-01 | -1.056458e+00 | 1.412094e+00 |
Country_Morocco | 1.873879e-01 | 5.878484e-01 | 0.318769 | 7.499328e-01 | -9.654258e-01 | 1.340202e+00 |
iHIV | 1.403563e-02 | 4.142533e-02 | 0.338818 | 7.347804e-01 | -6.720248e-02 | 9.527374e-02 |
Country_Tonga | 3.967493e-01 | 6.619078e-01 | 0.599403 | 5.489678e-01 | -9.013002e-01 | 1.694799e+00 |
Country_Republic of Moldova | 5.120735e-01 | 6.709034e-01 | 0.763260 | 4.453926e-01 | -8.036171e-01 | 1.827764e+00 |
Country_Tuvalu | 2.592587e-08 | 2.248507e-08 | 1.153026 | 2.490285e-01 | -1.816900e-08 | 7.002074e-08 |
Polio | 3.261042e-03 | 2.812878e-03 | 1.159326 | 2.464527e-01 | -2.255217e-03 | 8.777300e-03 |
Country_Libya | 7.361366e-01 | 6.248871e-01 | 1.178031 | 2.389151e-01 | -4.893126e-01 | 1.961586e+00 |
Country_Guatemala | 8.907405e-01 | 6.624187e-01 | 1.344679 | 1.788714e-01 | -4.083110e-01 | 2.189792e+00 |
Country_Jordan | 1.117858e+00 | 6.942210e-01 | 1.610234 | 1.074942e-01 | -2.435598e-01 | 2.479277e+00 |
Country_Brazil | 1.180940e+00 | 6.934523e-01 | 1.702986 | 8.871587e-02 | -1.789710e-01 | 2.540850e+00 |
Country_Dominican Republic | 1.092110e+00 | 6.223024e-01 | 1.754951 | 7.941070e-02 | -1.282700e-01 | 2.312491e+00 |
Country_Mauritius | 1.066178e+00 | 5.946133e-01 | 1.793061 | 7.310438e-02 | -9.990239e-02 | 2.232258e+00 |
Country_Cabo Verde | 1.228555e+00 | 6.510965e-01 | 1.886902 | 5.930878e-02 | -4.829266e-02 | 2.505403e+00 |
Country_Saudi Arabia | 1.203026e+00 | 6.073268e-01 | 1.980855 | 4.773536e-02 | 1.201412e-02 | 2.394039e+00 |
Country_Seychelles | 1.139089e+00 | 5.688207e-01 | 2.002546 | 4.535204e-02 | 2.359039e-02 | 2.254588e+00 |
Country_Grenada | 1.570422e+00 | 7.178004e-01 | 2.187826 | 2.879010e-02 | 1.627633e-01 | 2.978082e+00 |
Schooling | 1.092271e-01 | 4.929293e-02 | 2.215878 | 2.680471e-02 | 1.256008e-02 | 2.058942e-01 |
Country_Algeria | 1.466607e+00 | 6.378335e-01 | 2.299358 | 2.158052e-02 | 2.157692e-01 | 2.717445e+00 |
Country_Sri Lanka | 1.709911e+00 | 6.701607e-01 | 2.551494 | 1.079522e-02 | 3.956767e-01 | 3.024145e+00 |
Country_Thailand | 1.779859e+00 | 6.928353e-01 | 2.568949 | 1.026797e-02 | 4.211579e-01 | 3.138559e+00 |
Country_Kuwait | 1.610600e+00 | 6.152717e-01 | 2.617705 | 8.914716e-03 | 4.040069e-01 | 2.817192e+00 |
Country_Honduras | 1.704227e+00 | 6.237124e-01 | 2.732392 | 6.339303e-03 | 4.810812e-01 | 2.927372e+00 |
Diphtheria | 8.486582e-03 | 2.948735e-03 | 2.878041 | 4.041215e-03 | 2.703897e-03 | 1.426927e-02 |
Country_Armenia | 1.918190e+00 | 6.644430e-01 | 2.886913 | 3.929434e-03 | 6.151682e-01 | 3.221211e+00 |
Country_Malaysia | 1.923192e+00 | 6.061451e-01 | 3.172825 | 1.531052e-03 | 7.344972e-01 | 3.111887e+00 |
Country_Colombia | 1.869283e+00 | 5.786304e-01 | 3.230530 | 1.254349e-03 | 7.345461e-01 | 3.004019e+00 |
Country_Paraguay | 1.977906e+00 | 5.850927e-01 | 3.380499 | 7.365351e-04 | 8.304960e-01 | 3.125315e+00 |
Country_Iran (Islamic Republic of) | 2.532728e+00 | 7.280429e-01 | 3.478818 | 5.137009e-04 | 1.104983e+00 | 3.960474e+00 |
Country_Peru | 2.081224e+00 | 5.878562e-01 | 3.540363 | 4.081111e-04 | 9.283952e-01 | 3.234053e+00 |
Country_Tunisia | 2.200142e+00 | 6.191602e-01 | 3.553429 | 3.884787e-04 | 9.859233e-01 | 3.414360e+00 |
Country_Turkey | 2.225846e+00 | 5.908441e-01 | 3.767230 | 1.695281e-04 | 1.067157e+00 | 3.384534e+00 |
Country_Lebanon | 2.314988e+00 | 6.099977e-01 | 3.795077 | 1.516985e-04 | 1.118738e+00 | 3.511238e+00 |
Country_Georgia | 2.325753e+00 | 5.933143e-01 | 3.919934 | 9.135753e-05 | 1.162220e+00 | 3.489286e+00 |
Country_Samoa | 2.665064e+00 | 6.541280e-01 | 4.074224 | 4.785119e-05 | 1.382271e+00 | 3.947857e+00 |
logExpend | 1.368168e-01 | 3.310361e-02 | 4.132987 | 3.718740e-05 | 7.189819e-02 | 2.017354e-01 |
Country_Montenegro | 2.661788e+00 | 6.418017e-01 | 4.147368 | 3.494506e-05 | 1.403168e+00 | 3.920408e+00 |
Country_Nicaragua | 2.620535e+00 | 6.315138e-01 | 4.149608 | 3.460759e-05 | 1.382090e+00 | 3.858980e+00 |
Country_The former Yugoslav republic of Macedonia | 3.018132e+00 | 6.802430e-01 | 4.436844 | 9.591920e-06 | 1.684126e+00 | 4.352138e+00 |
Country_Serbia | 2.889230e+00 | 6.315070e-01 | 4.575135 | 5.031413e-06 | 1.650798e+00 | 4.127661e+00 |
Country_Oman | 2.847179e+00 | 6.038693e-01 | 4.714892 | 2.574149e-06 | 1.662947e+00 | 4.031410e+00 |
Country_Venezuela (Bolivarian Republic of) | 3.193301e+00 | 6.566846e-01 | 4.862763 | 1.241834e-06 | 1.905495e+00 | 4.481108e+00 |
Country_Barbados | 3.298628e+00 | 6.569644e-01 | 5.021016 | 5.564854e-07 | 2.010273e+00 | 4.586984e+00 |
Country_Maldives | 3.954402e+00 | 7.761869e-01 | 5.094651 | 3.800035e-07 | 2.432243e+00 | 5.476561e+00 |
Country_Jamaica | 3.090735e+00 | 6.025343e-01 | 5.129558 | 3.165830e-07 | 1.909121e+00 | 4.272349e+00 |
Country_Argentina | 3.522508e+00 | 6.554501e-01 | 5.374181 | 8.529424e-08 | 2.237122e+00 | 4.807893e+00 |
Country_Viet Nam | 3.633903e+00 | 6.619204e-01 | 5.489940 | 4.497364e-08 | 2.335829e+00 | 4.931978e+00 |
Country_Estonia | 3.866735e+00 | 7.027873e-01 | 5.501999 | 4.204258e-08 | 2.488518e+00 | 5.244952e+00 |
Country_Saint Vincent and the Grenadines | 3.546004e+00 | 6.322555e-01 | 5.608499 | 2.304945e-08 | 2.306105e+00 | 4.785904e+00 |
Country_Albania | 3.527683e+00 | 6.070984e-01 | 5.810726 | 7.151623e-09 | 2.337118e+00 | 4.718247e+00 |
Country_Saint Lucia | 3.699044e+00 | 6.330338e-01 | 5.843359 | 5.899884e-09 | 2.457618e+00 | 4.940470e+00 |
Country_Ecuador | 3.275261e+00 | 5.603980e-01 | 5.844526 | 5.859342e-09 | 2.176279e+00 | 4.374242e+00 |
Country_Bahrain | 3.896774e+00 | 6.644473e-01 | 5.864684 | 5.200030e-09 | 2.593744e+00 | 5.199804e+00 |
Country_United Arab Emirates | 3.702151e+00 | 6.243671e-01 | 5.929446 | 3.534649e-09 | 2.477722e+00 | 4.926581e+00 |
Country_Bahamas | 4.168751e+00 | 6.880588e-01 | 6.058714 | 1.616754e-09 | 2.819418e+00 | 5.518085e+00 |
Country_Antigua and Barbuda | 4.402229e+00 | 6.664384e-01 | 6.605606 | 4.979918e-11 | 3.095295e+00 | 5.709164e+00 |
Country_Mexico | 4.116571e+00 | 6.010069e-01 | 6.849457 | 9.654499e-12 | 2.937952e+00 | 5.295189e+00 |
Country_Bosnia and Herzegovina | 4.633266e+00 | 6.700182e-01 | 6.915134 | 6.148647e-12 | 3.319311e+00 | 5.947221e+00 |
infant deaths | 9.060206e-02 | 1.306114e-02 | 6.936766 | 5.294981e-12 | 6.498821e-02 | 1.162159e-01 |
Country_Brunei Darussalam | 4.179517e+00 | 5.983163e-01 | 6.985463 | 3.776118e-12 | 3.006175e+00 | 5.352859e+00 |
Country_Qatar | 5.105357e+00 | 6.542522e-01 | 7.803348 | 9.351701e-15 | 3.822321e+00 | 6.388394e+00 |
Country_Uruguay | 4.940473e+00 | 6.139174e-01 | 8.047456 | 1.386888e-15 | 3.736537e+00 | 6.144410e+00 |
Country_Panama | 5.375253e+00 | 5.747970e-01 | 9.351567 | 2.102387e-20 | 4.248034e+00 | 6.502472e+00 |
Country_Cuba | 6.024380e+00 | 5.841622e-01 | 10.312854 | 2.269453e-24 | 4.878795e+00 | 7.169964e+00 |
Country_Chile | 7.631849e+00 | 6.605734e-01 | 11.553371 | 5.398430e-30 | 6.336417e+00 | 8.927282e+00 |
Country_Costa Rica | 6.982737e+00 | 5.697886e-01 | 12.254960 | 2.027169e-33 | 5.865339e+00 | 8.100134e+00 |
Country_Republic of Korea | 9.750169e+00 | 7.194085e-01 | 13.553035 | 3.300087e-40 | 8.339356e+00 | 1.116098e+01 |
Country_Greece | 1.026885e+01 | 7.291159e-01 | 14.083974 | 3.785762e-43 | 8.839000e+00 | 1.169870e+01 |
Country_Canada | 1.002031e+01 | 7.083147e-01 | 14.146690 | 1.677612e-43 | 8.631251e+00 | 1.140937e+01 |
Country_Finland | 9.252164e+00 | 6.449588e-01 | 14.345356 | 1.248971e-44 | 7.987352e+00 | 1.051698e+01 |
Country_France | 1.074428e+01 | 7.392236e-01 | 14.534550 | 1.023979e-45 | 9.294611e+00 | 1.219395e+01 |
Country_Israel | 9.392544e+00 | 6.020722e-01 | 15.600361 | 4.764306e-52 | 8.211836e+00 | 1.057325e+01 |
Year | 3.207764e-01 | 1.329531e-02 | 24.127039 | 5.805972e-114 | 2.947033e-01 | 3.468494e-01 |