I first became interested in networks when reading Matthew O'Jackson's 2010 paper describing their application to economics. During the 2014 ebola outbreak, there was a lot of concern over the disease spreading to the U.S.. I was caught up with work/classes at the time, but decided to use airline flight data to at least explore the question. The source … Continue reading Modeling Ebola Contagion Using Airline Networks in R

# NYC Motor Vehicle Collisions – Street-Level Heat Map

In this post I will extend a previous analysis creating a borough-level heat map of NYC motor vehicle collisions. The data is from NYC Open Data. In particular, I will go from borough-level to street-level collisions. The processing of the code is very similar to the previous analysis, with a few more functions that map streets to colors. … Continue reading NYC Motor Vehicle Collisions – Street-Level Heat Map

# Simulating Endogeneity

Introduction The topic in this post is endogeneity, which can severely bias regression estimates. I will specifically simulate endogeneity caused by an omitted variable. In future posts in this series, I'll simulate other specification issues such as heteroskedasticity, multicollinearity, and collider bias. The Data-Generating Process Consider the data-generating process (DGP) of some outcome variable $latex Y $: … Continue reading Simulating Endogeneity

# Motor Vehicle Collision Density in NYC

In a previous post, I visualized crime density in Boston using R's ggmap package. In this post, I use ggmap to visualize vehicle accidents in New York City. R code and data are included in this post. The data comes from NYC Open Data. My data cut ranges from 2012 to 2015. The data tracks the type of … Continue reading Motor Vehicle Collision Density in NYC

# Visualizing Hubway Trips in Boston

Most Popular Hubway Stations (in order): Post Office Sq. - located in the heart of the financial district. Charles St. & Cambridge - the first Hubway stop after crossing from Cambridge over Longfellow Bridge. Tremont St & West - East side of the Boston Common South Station Cross St. & Hannover - entrance to North End combing from financial … Continue reading Visualizing Hubway Trips in Boston

# Drug Crime Density in Boston

The original map can be found in my previous post, Spatial Data Visualization with R. As a review, I use get_map function in the ggmap package to grab a map of Boston from Google Maps. The "crime report" data can be found at https://data.cityofboston.gov/. In the code below, I bring in crime data as a csv file. The data … Continue reading Drug Crime Density in Boston

# Finding and Plotting Lorenz Solution using MATLAB

I use MATLAB to solve the following Lorenz initial value problem: $latex \begin{cases} x'=-10(x+y) \\ y'=-x(z+28)-y \\ z'=xy-\frac{8}{3}z \\ x(0)=y(0)=z(0)=5 \end{cases} $ I wrote a function, LorenzRK4IVP(), that takes the system of three differential equations as input and solves the system using the Runge-Kutta method with step size $latex h=.01$. I plot the strange attractor as … Continue reading Finding and Plotting Lorenz Solution using MATLAB