Welcome to my personal blog where I post mostly notes about programming in R or Stata. Enjoy!



  • Visualizing Protests for Racial Justice with ggplot and gganimate
    On May 25, 2020, George Floyd, an African American man, was killed by a White police officer in Minneapolis, Minnesota. His murder came shortly after the homicide of two other African Americans: Ahmaud Arbery, on February 23, 2020, and Breonna Taylor, on March 13, 2020. These horrible crimes sparked a movement and a wave of protest, unlike anything we’ve seen in recent years in America.

  • RK's Ford vs Ferrari Revisited
    A couple of weeks back Roger Koenker reminded me about my post comparing quantreg vs. Rmosek. In Angrist’s application, Rmosek was faster than the traditional Barrondale and Roberts. However, Roger was curious about how it would compare to the interior point algorithms implemented using FORTRAN in quantreg. Here are his results (reproduced from RK’s blog with his permission) run on his mac mini:

  • RATest. A Randomization Tests package is available on CRAN
    This blog post introduces the RATest package we released a while back on CRAN with my colleague and good friend Mauricio Olivares-Gonzalez. The package contains a collection of randomization tests, data sets and examples. The current version focuses on two testing problems and their implementation in empirical work, mostly related to economics. First, it facilitates the empirical researcher to test for particular hypotheses, such as comparisons of means, medians, and variances from k populations using robust permutation tests, which asymptotic validity holds under very weak assumptions, while retaining the exact rejection probability in finite samples when the underlying distributions are identical. Second, it implements Canay and Kamat (2017) permutation test for testing the continuity assumption of the baseline covariates in the sharp regression discontinuity design (RDD).

  • A Simple Spatial Equilibrium Model with Tidycensus
    The Spatial Equilibrium concept is well known to urban economists. In a nutshell, it states that in equilibrium there are no rents to be gained by changing locations. Ed Glaeser begins Chapter 2 of his book: “Cities, Agglomeration, and Spatial Equilibrium” with the well known Alonso-Muth-Mills model. In this post, I want to summarize it briefly following Ed Glaeser presentation and reproduce his 2.1. and 2.2. figures. This is the perfect excuse to play around with the “tidycensus” package.

  • Mapping Racial Segregation in Chicago
    This spring break I was reading a couple of papers about segregation in the US (Cutler and Galeser 1997 and Cutler et al 1999). A paragraph on Cutler et al (1999) caught my attention: “Chicago was the most segregated city in 1890, the fourth most segregated city in 1940, the most segregated MSA in 1970, and the fourth most segregated MSA in 1990”. As I was reading this I kept thinking on mapping out Chicago with more recent census data.

  • An Introduction to Spatial Econometrics in R
    This tutorial was prepared for the Ninth Annual Midwest Graduate Student Summit on Applied Economics, Regional, and Urban Studies (AERUS) on April 23rd-24th, 2016 at the University of Illinois at Urbana Champaign.

  • Mean and Quantile Regression using Mosek
    Many of the problems we encounter in Econometrics can be formulated as a linear or a quadratic problem. In this post, I want to approach two traditional problems: Quantile Regression and Ordinary Least Squares as convex problems and how to implement them in R using the package RMosek.



Ignacio
Sarmiento Barbieri

University of Los Andes


Blogs/Links


These are blogs/sites I frequently visit