Year: 2015

Logistics Regression on Economic Development

Last lesson of Regression Modelling in Practice… If you have been following along with my work, you will know that I am interested in the relationship between urbanization and economic development and am posing the general question of whether urbanization drives economic growth? Through the past two courses, Data Analysis Tools and Data Management and Visualization, I looked at the correlation between urbanization and economic development and established that there was a correlation between urban population and GDP per capita. For this last assignment in the course Regression Modelling in Practice, I am again examining GDP per Capita as the response variable. I am using the new data set I created in the last assignment from Gapminer, which as  I explained, holds a more complete set of data if I used the year 2007 instead of 2010. As a logistic regression is performed on a categorical response variable with two levels and multiple explanatory variables, I had to bin GDP per Capita into two and recode them: 0 = Countries with a GDP per Capita less than …

Employment and Urbanization

Continuing with Regression Modelling in Practice… If you have been following along with my work, you will know that I am interested in the relationship between urbanization and economic development and am posing the general question of whether urbanization drives economic growth? Through the past two courses, Data Analysis Tools and Data Management and Visualization, I looked at the correlation between urbanization and economic development and established that there was a correlation between urban population and GDP per capita. For this assignment, I decided to look at another measure of economic development – employment rate. However, because data for 2010 is unavailable for some of the new variables I wanted to include, I decided to use data from the year 2007. It is the most recent year where I get the most data for all my variables. For each of the variables, I downloaded data directly from Gapminder and extracted the relevant information for 2007 and compiled a new CSV file. I define my response variable as Employment Rate in 2007. Now that my data …

Coming Together, Falling Apart

In reality, equilibrium is only an observation over a large scale of time, but at any specific time period, things are more like a pendulum, swinging from one end of the spectrum to the next. Looking at the world today, and the violent conflicts that seem to escalate in scale, it would appear that the world has forgotten the horrors of war – the incredible devastation of the two World Wars that obliterated most of Europe – and the resulting need for international unity and harmony. As the old Chinese saying goes “after a long time together, it ought to separate, after a long time divided, it ought to come together”. In many ways, if we look at the history of the world, that is exactly how things play out. The world gets smaller, then it divides and feels farther apart. The Macedonian Empire disintegrated into separate polities, only to reunite again under the Romans. The Mongolian tribes were brought together into the largest empire ever seen only to fall apart. In some ways, faced with …

Basic Regression on Urban Population Growth and GDP per Capita

Continuing with Regression Modelling in Practice… If you have been following along with my work, you will know that I am interested in the relationship between urbanization and economic development and am posing the general question of whether urbanization drives economic growth? Through the past two courses, Data Analysis Tools and Data Management and Visualization, I established that there was a correlation between urban population and GDP per capita. For this assignment, my primary explanatory variable is Urban Population Growth rate and response variable is GDP per capita, both figures are from 2010. This is my code in Python: import pandas import numpy import seaborn import matplotlib.pyplot as plt import statsmodels.formula.api as smf import statsmodels.stats.multicomp as multi gapminder = pandas.read_csv(‘Data1.csv’, low_memory=False) gapminder[‘GDP2010’] = gapminder[‘GDP2010’].replace(0,numpy.nan) gapminder[‘GDPGrowth2010’] = gapminder[‘GDPGrowth2010’].replace(0,numpy.nan) gapminder[‘UrbanPop2010’] = gapminder[‘UrbanPop2010’].replace(0,numpy.nan) gapminder[‘UrbanPopGrowth2010’] = gapminder[‘UrbanPopGrowth2010’].replace(0,numpy.nan) gapminder = gapminder[[‘Country’, ‘UrbanPop2010’, ‘UrbanPopGrowth2010’, ‘GDP2010’, ‘GDPGrowth2010’]] gapminder = gapminder.dropna() PopDes = gapminder[‘UrbanPopGrowth2010’].describe() print (PopDes) RegData = gapminder[[‘Country’, ‘UrbanPopGrowth2010’, ‘GDP2010’]] RegData[‘UrbanPopGrowth2010’] = RegData[‘UrbanPopGrowth2010’] – RegData[‘UrbanPopGrowth2010′].mean() print (RegData.describe()) UrbanReg = smf.ols(formula=’GDP2010 ~ UrbanPopGrowth2010′, data=RegData).fit() print (UrbanReg.summary()) seaborn.regplot(x=’UrbanPopGrowth2010′, y=’GDP2010’, fit_reg=True, data=RegData) plt.xlabel(‘Urban Population Growth …

Bombing Oil Fields and Fighting Islamic State

Has anyone given thought to the political, economic, and environmental consequences of such destruction? Has anyone thought about the devastating environmental impact of bombing oil fields? For the most part, the majority of the people under IS control are innocent. Yet, this sort of destruction and retaliation by the West, is exactly what drives the youth to join in the extremist movement. How can anyone be alright with the destruction of their livelihood and of their environment?

In Speaking of Data: Gapminder

This is the start of the third course, Regression Modeling in Practice, in the Data Analysis and Interpretations Specialization by Wesleyan University through Coursera. The first assignment is to provide a description of the data I have been working with – what is the sample, how the data is collected and how I managed the data. If you have been following along with my work, you will know that I am interested in the relationship between urbanization and economic development and am posing the general question of whether urbanization drives economic growth? My sample consists of countries, territories, and other political entities such as disputed territories, dependent territories, or semi-autonomous city-states like Hong Kong. According to Gapminder, where my data was downloaded, this list consists of 193 UN Nations, 51 other entities, 4 French overseas territories, 10 former states, and 2 ad-hoc areas totaling 260 (or N=260). However, because not every entity has data in the indicators I am using, the number of entities in my work is reduced to 164 (or N=164). In the case …

The Moderating Variable

Last Lesson in Data Analysis Tools… If you have not read my previous posts, I am currently enrolled in a Data Analysis Specialization with Wesleyan University through Coursera. With data from Gapminder, I am exploring a broad and basic question: does urbanization drive economic growth? For those of you interested in reading my literature review to gain a background on this project, please visit this page. This is the last lesson in the Data Analysis Tools course. After analyzing for correlations between variables, this assignment focuses on moderating variables. A moderating variable is one that influences the strength and direction of the association between the explanatory and response variables. Last time, I established that there were correlations between the amount of urbanization, as measured by percentage of total population in cities with over 1 million people, urban population growth, and GDP per capita. Additionally, I found that there was a correlation between total populations in cities and urban population growth. I suspect that one of these two variables might be a moderating variable. I first looked at total …