A great idea: R Markdown for Undergrads

Great post about introducing students to the fundamental concept of reproducibility in science while teaching them R

Landscape Ecology 2.0

A recently published paper by Baumer et al (2014) caught my eye today (HT to Bruce Caron).  I wanted to share it here because I thought it was cool and also had a few comments to make about some of the issues the authors raised.

First, a bit about the paper.  Partly in response to all the media attention to the crisis in reproducibility in science (e.g. Nature) Baumer and colleagues made some changes to introductory statistics classes at Duke, Smith, and Amherst.  The primary change was to require the use of R Markdown for all homework.  RStudio was the editor they used and it appears any cutting and pasting of code, figures, etc. was not allowed.  They conducted a survey of the students early in the class and after the class.  The end result was that students preferred using R Markdown over the typical mode of cut and…

View original post 259 more words


Public transport expansions and informality

The São Paulo Metropolitan Region faces an acute deficit of public transport infrastructure, making commutes long and costly for workers. The difficulty in accessing jobs centers may translate into higher informality rates, since workers may be discouraged to take formal jobs, miss on information about job opportunities, or even be discriminated against according to  their place of residence.

Usuários lotam a plataforma da estação Sé do Metrô de São Paulo, sentido Corinthians-Itaquera

Sé metro station, Corinthians-Itaquera direction. Source: Viatrolebus

In a new working paper co-authored with Frederico R. Ramos, we estimate the impact of public transport expansions on local informality rates. An important part of the explanation for the large deficit in transport infrastructure are chronic project delays. We use this information in our methodological approach to compare areas that received new transport infrastructure with areas where new train/metro stations or bus corridors were planned, but eventually not built.

Example of areas with and without a bus corridor

Example of areas with (left) and without (right) a bus corridor. Source: Google Earth

After controlling for endogenous selection, we find this impact to be significant: informality rates decreased on average 16% faster in areas that received new transport infrastructure, compared to areas that faced project delays.

Graphical Presentation of Regression Discontinuity Results

The Political Methodologist

[Editor’s note: this post is contributed by Natalia Bueno and Guadalupe Tuñón.]

During the last decade, an increasing number of political scientists have turned to regression-discontinuity (RD) designs to estimate causal effects.  Although the growth of RD designs has stimulated a wide discussion about RD assumptions and estimation strategies, there is no single shared approach to guide empirical applications. One of the major issues in RD designs involves selection of the “window” or “bandwidth” — the values of the running variable that define the set of units included in the RD study group. [i]

This choice is key for RD designs, as results are often sensitive to bandwidth size. Indeed, even those who propose particular methods to choose a given window agree that “irrespective of the manner in which the bandwidth is chosen, one should always investigate the sensitivity of the inferences to this choice. […] [I]f the results…

View original post 2,474 more words

New R package to characterize the spatial structure of point patterns

Erik Marcon, Stephane Traissac, Florence Puech and Gabriel Lang have developed the R package dbmss that provides a toolbox to characterize point patterns. The package greatly simplifies the task of obtaining distance-based agglomeration and coagglomeration indexes, such as the Duranton and Overman’s Kd function and the Marcon and Puech’s M functions.

Eating chocolate has made the Swiss smarter. Really?

I found an article that studies the beneficial effect of chocolate consumption on cognitive function. To prove his theory, the author uses the correlation between countries’ annual per capita chocolate consumption and the number of Nobel Laureates per 10 million people. And…nothing else.


Chocolate and Nobel Laureates

The study acknowledges some of its very obvious methodological limitations, but still concludes that “since chocolate consumption has been documented to improve cognitive function, it seems most likely that in a dose-dependent way, chocolate intake provides the abundant fertile ground needed for the sprouting of Nobel laureates.”

Now, for all we know the correlation is not “surprisingly powerful”, as the author concludes, but a mere coincidence. The many  non-sense correlation plots shared recently on social media have helped popularizing the idea that “correlation does not imply causation”.  The interesting fact about this article, however, is that it was published in the New England Journal of Medicine, one of the most prestigious medical journals in the world (featuring a staggering 54.42 (!!) impact factor). To be fair, the article is published as an “occasional note”, which also seems to serve as a humor section. If only all top-journals had such a twisted sense of humor!

On transport subsidies and employment

The current mayor of Bogotá, Gustavo Petro, launched last week a transport subsidy program for the poor. At least 300,000 people covered by the nationwide health subsidy program (Sisben) can now obtain a transport card allowing them to travel in the integrated transport system of the city at a reduced rate. According to the mayor, the subsidy is the flagship policy for poverty reduction of his administration, as it will allow the poor to access more job and income generation opportunities, even if these opportunities are at the bottom of the informal economy (nivel de rebusque).

While this policy may be good news for poverty reduction, my co-author Héctor Mauricio Posada and I have found in our recent paper that a policy that offers transport subsidies for informal workers only will imply an increase in the share of informal employment, and a decrease in overall welfare in the city. In our theoretical model, informal workers have the possibility to engage in home-based work and save in transportation costs, while formal workers commute every day to work in the city center. A subsidy targeted only for informal workers means that formal firms have to offer higher wages in order to compensate workers for higher transportation costs, which implies a reduction in formal employment creation.

We find that investing the money of the subsidy in alternative policies aimed at reducing the frictions in the job market, such as a the recently created Public Management Agency for Employment  (Bogotá Trabaja), or expanding the coverage of the transportation network, implies a reduction in the informality rate, and an increase in overall welfare.

While our findings rely on a very stylized model that does not consider many other relevant elements, such as access to basic services and their impact on poverty reduction, they highlight the importance of considering the unintended effects of policies targeted at the poor on the labor market at large. Sustainable urban policies require not only better physical access, but also an increase in the share of higher quality jobs offered in the city.


Talk about divergence

I agree with Hans Rosling in that an effective way of introducing the basic facts of economic development to students is through myth debunking. The resources provided in his website are certainly useful in this respect. One of the best ways to use this resource is to find those striking cases of divergence in outcomes that disprove a generally accepted fact. A particularly example I find mind-blowing is the stark divergence in the evolution of incomes and life expectancy in Equatorial Guinea and Madagascar between 1990 and 2012…