Projects


Working Papers


Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills

with Maximilian Auffhammer

In 2016 natural gas became the United States’ primary source of energy for electricity generation. It is also the main heating fuel for more than 50% of American homes. Hence understanding residential natural gas consumption behavior has become a first-order problem. In this paper, we provide the first ever causally identified, microdata-based estimates of residential natural gas demand elasticities using a decade-long panel of more than 275 million bills in California. To overcome multiple sources of endogeneity, we utilize the border between two major natural-gas utilities, in conjunction with an instrumental variables strategy. We estimate the elasticity of demand for residential natural gas is between -0.31 and -0.17. We also provide evidence of seasonal and income-based heterogeneity in this elasticity. This heterogeneity provides unexplored policy avenues that may be simultaneously efficiency-enhancing and pro-poor.

NBER Working Paper No. 24295 | EI @ Haas Working Paper 287

draft | slides | map: service and study area | map: PRISM mean temperature | map: US natural gas pipeline


Are our hopes too high? Testing cannabis legalization’s potential to reduce criminalization

Cannabis legalization advocates often argue that cannabis legalization offers the potential to reduce the private and social costs related to criminalization and incarceration—particularly for marginalized populations. While this assertion is theoretically plausible, it boils down to an empirically testable hypothesis that remains untested: does legalizing a previously illegal substance (cannabis) reduce arrests, citations, and general law-enforcement contact? This paper provides the first causal evidence that cannabis legalization need not necessarily reduce criminalization—and under the right circumstances, may in fact increase police incidents/arrests for both cannabis products and non-cannabis drugs. First, I present a theoretical model of police effort and drug consumption that demonstrates the importance of substitution and incentives for this hypothesis. I then empirically show that before legalization, drug-incident trends in Denver, Colorado matched trends in many other US cities. However, following cannabis legalization in Colorado, drug incidents spike sharply in Denver, while trends in comparison cities (unaffected by Colorado’s legalization) remain stable. This spike in drug-related police incidents occurs both for cannabis and non-cannabis drugs. Synthetic-control and difference-in-differences empirical designs corroborate the size and significance of this empirical observation, estimating that Colorado’s legalization of recreational cannabis nearly doubled police-involved drug incidents in Denver.

new draft in preparation | slides | US legalization map | timeline | time series drug offenses


Do aerially applied pesticides affect local air quality? Empirical evidence from California’s San Joaquin Valley

Many policymakers, public-health advocates, and citizen groups question whether current pesticide regulations properly equate the marginal social costs of pesticide applications to their marginal social benefits—with particular concern for negative health effects stemming from pesticide exposure. Additionally, recent research and policies in public health, epidemiology, and economics emphasize how fine particulate matter (PM2.5) concentrations harm humans through increased mortality, morbidity, mental health issues, and a host of socioeconomic outcomes. This paper presents the first empirical evidence that aerially applied pesticides increase local PM2.5 concentrations. To causally estimate this effect, I combine the universe of aerial pesticide applications in the five southern counties of California’s San Joaquin Valley (1.8M reports) with the U.S. EPA’s PM2.5 monitoring network—exploiting (1) spatiotemporal variation in aerial pesticide applications and (2) variation in local wind patterns. I find significant evidence that (upwind) aerial pesticide applications within 1.5km increase local PM2.5 concentrations. The magnitudes of the point estimates suggest that the top decile of aerial applications may sufficiently increase local PM2.5 to warrant concern for human health.

new draft in preparation


In Progress


How salient are environmental risks? The short- and long-run effects of lead exposure in piped water


Irrigation and climatic effects on water levels in the U.S. High Plains Aquifer

with Lilyan Fulginiti and Richard Perrin


Is “Michelle” less productive than “Michael”? A field experiment on consumer-based gender discrimination in the marketplace

with Erin Kelley and Matthew Pecenco


Presentations


Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
World Congress of Environmental Economics (WCERE), June 2018

Is “Michelle” less productive than “Michael”? A field experiment on consumer-based gender discrimination in the marketplace
UC Berkeley, Computational Text Analysis Working Group, April 2018

Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
University of Oregon, Economics, February 2018

Is “Michelle” less productive than “Michael”? A field experiment on consumer-based gender discrimination in the marketplace
IGC-PEDL Workshop at Oxford, December 2017

Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
Heartland Environmental and Resource Economics Workshop, September 2017

Is “Michelle” less productive than “Michael”? A field experiment on consumer-based gender discrimination in the marketplace
Berkeley Development Economics Lunch, September 2017

Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
Camp Resources, August 2017

Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
AAEA Annual Meeting, August 2017

Do marijuana stores increase or reduce neighborhood crime? Evidence from Denver, Colorado
UC Berkeley, Summer Research Seminar, July 2017

Natural gas elasticities and optimal cost recovery under heterogeneity: Evidence from 300 million natural gas bills in California
AERE Annual Summer Conference, June 2017

Summertime, and pass-through is easier: Chasing down price elasticities for residential natural gas demand in 275 million bills
22nd Annual POWER Conference on Energy Research and Policy, March 2017

Natural gas elasticities, seasonal heterogeneity, and consumer behavior: Evidence from 300M+ bills
UC Berkeley, Environmental and Resource Economics Seminar, November 2016

(Mile-) High Quandaries: Evidence from Denver that Marijuana Legalization May Increase Drug Arrests
UC Berkeley, Environmental and Resource Economics Seminar, April 2015

Irrigation and Climatic Effects on Water Levels in the U.S. High Plains Aquifer Along the 41st Parallel in Nebraska (and Several Questions about Model Complexity)
University of Nebraska-Lincoln, Statistics Departmental Seminar, March 2013

Irrigation and Climatic Effects on Water Levels in the U.S. High Plains Aquifer
International Conference of Agricultural Economists, poster, August 2012

Reproductive Ecology of Western Painted Turtles (Chrysemys picta)
Midwest Fish and Wildlife Conference, poster, December 2006

R scripts

Run R code in terminal without entering R or saving a script. (The -e option evaluates the given R expression.)

Rscript -e 'set.seed(12345); x <- rnorm(1e3); mean(x)'
Rscript -e 'rmarkdown::render_site("research.Rmd")'

Create a nice timeline (shown below) in R’s ggplot2.

# Setup ----
# Packages
library(ggplot2)
# Define colors (from https://www.materialpalette.com)
dark_primary_color   <- "#C2185B"
primary_color        <- "#E91E63"
light_primary_color  <- "#F8BBD0"
text_primary_color   <- "#FFFFFF"
accent_color         <- "#9E9E9E"
primary_text_color   <- "#212121"
secondary_text_color <- "#757575"
divider_color        <- "#BDBDBD"

# Plot the timeline ----
ggplot() +
  # Two rectangles
  geom_rect(aes(xmin = 2009, xmax = 2011+4/12, ymin = 0, ymax = 0.35),
    fill = divider_color) +
  geom_rect(aes(xmin = 2011+4/12, xmax = 2014, ymin = 0, ymax = 0.35),
    fill = light_primary_color) +
  geom_rect(aes(xmin = 2014, xmax = 2017, ymin = 0, ymax = 0.35),
    fill = primary_color) +
  # Label rectangles (periods)
  annotate(geom = "text", x = 2010, y = -0.15, label = "Period A",
    color = divider_color) +
  annotate(geom = "text", x = 2015.5, y = -0.15, label = "Period B",
    color = primary_color) +
  # Add ellipses
  annotate(geom = "point", x = seq(2009-0.15, 2009-0.45, -0.15), y = 0.175,
    size = 1.5, color = divider_color) +
  annotate(geom = "point", x = seq(2017+0.15, 2017+0.45, 0.15), y = 0.175,
    size = 1.5, color = primary_color) +
  # Time axis
  geom_hline(yintercept = 0, size = 1, color = primary_text_color) +
  # Label time
  annotate(geom = "text", x = 2009:2017, y = -0.05, label = 2009:2017,
    size = 4, color = secondary_text_color) +
  # Points for events
  annotate(geom = "point", x = c(2011+4/12, 2012+7/12, 2014), y = 0,
    size = 4, color = primary_text_color) +
  # Label events:
  # First event
  annotate(geom = "text", x = 2011+4/12+0.15, y = 0.9, hjust = 0,
    label = "An event triggers a change", color = primary_text_color) +
  geom_segment(aes(x = 2011+4/12, xend = 2011+4/12,
    y = 0, yend = 0.9), color = primary_text_color) +
  geom_segment(aes(x = 2011+4/12, xend = 2011+4/12+0.1,
    y = 0.9, yend = 0.9), color = primary_text_color) +
  # Intermediate event
  annotate(geom = "text", x = 2012+7/12+0.15, y = 0.7, hjust = 0,
    label = "A relevant intermediate event", color = primary_text_color) +
  geom_segment(aes(x = 2012+7/12, xend = 2012+7/12,
      y = 0, yend = 0.7), color = primary_text_color) +
  geom_segment(aes(x = 2012+7/12, xend = 2012+7/12+0.1,
      y = 0.7, yend = 0.7), color = primary_text_color) +
  # Period B begins
  annotate(geom = "text", x = 2014+0.15, y = 0.5, hjust = 0,
    label = "The new period officially begins", color = primary_text_color) +
  geom_segment(aes(x = 2014, xend = 2014,
      y = 0, yend = 0.5), color = primary_text_color) +
  geom_segment(aes(x = 2014, xend = 2014+0.1,
      y = 0.5, yend = 0.5), color = primary_text_color) +
  # Theme stuff
  theme_bw() +
  ylim(c(-0.15,1)) +
  theme(axis.text = element_blank(), axis.title = element_blank(),
    axis.ticks = element_blank(), panel.grid = element_blank(),
    panel.border = element_blank())

LaTeX

My LaTeX (beamer) template: .tex file | example PDF

Example of my slide template.

Example of my slide template.

Bash

Pretty CSV scrolling

cat data.csv | column -t -s, | less -S

Hat tip (and more): Stefaan Lippens.

For a bit more raw view:

column -s, -t < data.csv | less -#2 -N -S

Git

Remove a file (your.file) from Git’s cache

git rm --cached your.file

Begin tracking a file extension (.eg) with Git’s Large File Storage (LFS) and check the .gitattributes file for success.

git lfs track "*.eg"
nano .gitattributes

Check which files LFS currently tracks.

git lfs ls-files

Pandoc

Convert a Markdown (.txt) file to Word (.docx).

pandoc -Ss example.txt -o example.docx

Convert a Markdown (.txt) file to PDF (.pdf).

pandoc -Ss example.txt -o example.pdf

Renaming

Place a “1” between the first four characters and the subsequent characters in each filename in a folder.

for i in *; do mv $i "${i:0:4}1${i:4}"; done

Sleeping and shutdown

Tell the computer to wait a bit and then go to sleep.

sleep 14400; pmset sleepnow

Tell the computer to shutdown now.

sudo shutdown -h now

Shut it down at a specific time (here: 2:30pm on 01 January 2016)

sudo shutdown -h 1601011530

Shut it down after a specified amount of time (here: 30 minutes)

sudo shutdown -h +30

Miscellany

OSX: Show only active apps in the terminal. h/t

defaults write com.apple.dock static-only -bool true; killall Dock

Kill all processes named “rsession”.

killall -m "rsession"

Re-index the Spotlight utility.

sudo mdutil -E /

Linux code for playing hide and seek.
Warning You might not want HAL to find you.

for i in {1..30}; do say ${i}; done; say 'ready or not, here i come'