Heterogeneous Effects

Identifying Outcome Distributions

Effects on Distributions vs Distributions of Effects

What can we learn about effect distributions?

Outcome Distribution Estimation

Quantile Regression

Properties of quantile regression estimator

Challenges with quantile regression

Conditional Density Estimation

Weighting method: Trees


Random Forests


Data Example: Wage Distribution Response to Labor Supply Shock

library(quantreg) #quantile regression
library(quantregForest) #quantile random forests
library(ggplot2) #Plots
library(drf) #distributional random forests
library(Counterfactual) #Conditional counterfactual distributions
library(npcausal) #Conditional counterfactual distributions 
library(haven) #Stata data
library(dplyr) #data manipulation

#Data set from Breza Kaur and Shamdasani (2021)
#In my case this is saved at
spilloversample<-dplyr::filter(rationing,surv_el==1 & sample_spillover==1 & e_manwage==1)
spilloversample$peakseason<-factor(spilloversample$peak, labels=c("Off-Peak Season","Peak Season"))

  ggtitle("Wage Distribution Response to Labor Supply Shock: Conditional CDF",
          subtitle="Breza, Kaur, and Shamdasani (2021)")+
  ylab("Fraction of Workers")+xlab("Daily Total Wage (Rupees)")

- Alternately represent by conditional kernel density, which applies smoothing and may improve interpretation, but is less precisely estimated due to slower rate of density vs CDF estimation

  ggtitle("Wage Distribution Response to Labor Supply Shock: Conditional Kernel Density",
          subtitle="Breza, Kaur, and Shamdasani (2021)")+
  ylab("Probability Density of Workers")+xlab("Daily Total Wage (Rupees)")