Skip to content

stevenli-uoft/Causal_Inference_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

The Impact of Uber on Taxi Rides: A Causal Inference Study

Project Overview

This project investigates the causal effect of Uber's introduction on Taxi usage in Calgary. Uber was introduced to Calgary in December 2016, so this study employs a Difference-in-Differences (DiD) approach to analyze the impact from 2014 to 2018, using Calgary as the treamment city and Vancouver as the control city (Uber was introduced to Vancouver in 2020).

Data

The dataset includes:

  • Monthly taxi rides for Calgary and Vancouver (2014-2018)
  • Monthly population (15+), labor force, employment rate, and unemployment rate for both cities Source
  • Monthly gas prices for both cities Source
  • Monthly mean temperature and total precipitation for both cities Source

Methodology

We employ a Difference-in-Differences (DiD) approach, treating Calgary as the intervention city and Vancouver as the control. The analysis includes:

  1. Pre-analysis: Exploratory Data Analysis (EDA) and parallel trends assumption check
  2. Basic DiD model
  3. Advanced DiD model with control variables
  4. Robustness checks: Placebo tests, parallel trends assumption re-check, heterogeneous effects analysis, and long-term effects analysis

Pre-Analysis Results

Parallel Trends Assumption Check

parellel_trend_test

The visualization shows normalized taxi rides for Vancouver and Calgary from 2014 to end of 2016. The parallel trends test results (p-value = 0.1083) suggest that the parallel trends assumption is reasonably satisfied, which is crucial for the validity of the DiD analysis.

Exploratory Data Analysis

taxi_rides_over_time

Key observations:

  • Vancouver consistently has higher taxi ridership than Calgary
  • Both cities show seasonal fluctuations in ridership
  • There's a noticeable downward trend in Calgary's ridership after Uber's introduction

Correlation Analysis

correlation_heatmap

Key findings:

  • Strong positive correlation (0.98) between Rides and Population
  • Strong negative correlation (-0.88) between Rides and Employment Rate
  • Moderate positive correlation (0.69) between Rides and Gas Price
  • Weak to moderate positive correlation (0.42) between Rides and Mean Temperature

DiD Analysis Results

Basic DiD Model

The basic Difference-in-Differences model provides a straightforward estimation of Uber's impact on taxi usage:

  • Effect Size (DiD Coefficient): -51,030 rides
  • Statistical Significance: Significant (p = 0.017)
  • Model Fit: R-squared = 0.990 (99.0% of variance explained)

The introduction of Uber is associated with a decrease of approximately 51,000 taxi rides per month in Calgary compared to Vancouver. This effect is both practically large and statistically significant.

Advanced DiD Model

The advanced model incorporates additional factors to provide a more nuanced understanding:

  • Effect Size (DiD Coefficient): -51,490 rides
  • Statistical Significance: Significant (p = 0.011)
  • Model Fit: R-squared = 0.995 (99.5% of variance explained)

Even after accounting for factors like population, employment rate, gas prices, and seasonal effects, we still see a substantial impact from Uber's introduction. The model suggests that Uber's presence is associated with a decrease of about 51,500 taxi rides per month.

To put this in perspective:

The effect represents a substantial portion of overall taxi ridership in Calgary. Based on the advanced model's results, it suggests that for every 10,000 taxi rides that would have occurred before Uber's introduction, approximately 1,430 of these rides were likely displaced by Uber or other alternatives after Uber began operations. This indicates a significant shift in transportation choices, with over 14% of potential taxi trips being affected by the presence of ride-sharing services.

DiD_Visualization

This graph visually represents the divergance in taxi usage between Calgary and Vancouver after Uber's introduction. Although it may be difficult to visually notice the divergence, the DiD model provides strong evidence that the introduction of Uber had a significant negative impact on Taxi trip volumes in Calgary.

Robustness Checks

  1. Placebo Test:

    • DiD Coefficient: -9.222e-08
    • P-value: 0.869 (Not significant, supporting the validity of main results)
  2. Heterogeneous Effects:

    • Interaction with High Population: 1.91e-07
    • P-value: < 0.001 (Significant, indicating less negative effect in high-population areas)
  3. Long-term Effects:

    • Years Since Uber Coefficient: -25,580
    • P-value: 0.168 (Not significant, suggesting no strong evidence for changing effects over time)

longterm_effects

Key Findings

  1. Uber's introduction is associated with a significant decrease in taxi rides in Calgary compared to Vancouver, with an estimated reduction of about 51,000 rides per month.
  2. This effect persists even after controlling for various factors like population, employment rate, gas prices, and seasonal effects.
  3. The impact of Uber appears to be less pronounced in areas with higher population.
  4. There's no strong evidence for changing effects over time, though there's a suggestion of potentially increasing negative effects.

Limitations and Future Work

  • Possible unaccounted factors influencing taxi usage in both cities, such as existing ride-sharing services.
  • Relatively short post-treatment period (2 years) limiting long-term effect analysis
  • Future work could include analyzing more treatment and control cities, although limited due to data avaiability.
  • Consideration of city-specific events or policies that might affect taxi ridership

About

The Impact of Uber on Taxi Rides: A Causal Inference Study

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages