Skip to content

Repository files navigation

The Effect of Gasoline Prices on Electric Vehicle Sales

Course: ECON 103B — Econometric Methods, Fall 2024
Institution: San Jose State University
Author: Richie Bhardwaj
Date: December 2024


Overview

This project estimates a multivariate time series OLS regression model to determine whether gasoline prices have a statistically significant effect on electric vehicle (EV) sales in California. Using annual data from 2000–2024, all variables are differenced to achieve stationarity before regression. The analysis finds a positive and statistically significant relationship between gasoline prices and EV sales. This paper serves as a capstone for ECON 103B and builds directly on prior research conducted in ECON 103A, which found income to be the primary driver of EV adoption rates.


Repository Structure

gas_prices_ev_sales/
├── gas_prices_ev_sales.R      # Main analysis script
├── data.xlsx                  # Time series dataset (2000–2024)
├── term_paper_103b.pdf        # Full term paper write-up
├── gas_prices_ev_sales.Rproj  # RStudio project file
└── README.md

Research Question

Do gasoline prices have a statistically significant impact on EV sales over time?

  • Null Hypothesis (H₀): β₁ₜ = 0, gasoline prices do not influence EV sales
  • Alternative Hypothesis (Hₐ): β₁ₜ ≠ 0, gasoline prices do influence EV sales
  • A two-sided t-test at the 5% significance level was used to evaluate the hypotheses

Econometric Model

Equation 1.1 (pre-differencing):

EV_Sales_t = α + β1t(Gas_Prices) + β2t(Income) + β3t(EV_Range)
           + β4t(EV_Chargers) + β5t(Rebates) + ε_t

Equation 1.2 (estimated, first-differenced variables):

ΔEV_Sales_t = -3,168.83 + 26,992.32(ΔGas_Prices_t) + 0.64(ΔIncome_t)
            + 82.23(ΔEV_Range_t) + 1.88(ΔEV_Chargers_t) + 2.02(ΔRebates_t)

Data

All data spans 2000–2024 annually. Note: the California Clean Vehicle Rebate Program was shut down in November 2023, though a small number of rebates were still issued in early 2024.

Variable Description Type Source
EV_Sales Annual EV sales in CA Dependent California Energy Commission
Gas_Prices Annual gasoline prices in CA, all grades, all formulations (USD) Independent (Main) U.S. Energy Information Administration
Income Annual per capita personal income in CA (USD) Independent U.S. Bureau of Economic Analysis / FRED
EV_Range Median range of EVs sold in the U.S. annually (miles) Independent U.S. Department of Energy
EV_Chargers Total BEV chargers in CA annually, public and private Independent California Energy Commission
Rebates Total number of rebates issued in CA annually Independent CA Clean Vehicle Rebate Project

Descriptive Statistics

Variable N Mean Std. Dev. Min Max
EV_Sales 24 84,525 123,632.8 0 441,283
Gas_Prices 24 3.246 1.002 1.561 5.406
Income 24 51,820 15,463.4 33,175 81,225
EV_Range 24 128.2 91.55 30 300
EV_Chargers 24 33,505 41,583.8 50 153,034
Rebates 24 17,056 22,437.4 0 85,216

Methodology

Stationarity Testing and Differencing

Before running the regression, each variable was tested for stationarity using three methods:

  • ACF (Autocorrelation Function): All six variables showed lag spikes above the 0.4 confidence interval and did not rapidly decay to zero, indicating dependence on past values.
  • ADF Test: All six variables produced p-values greater than 0.05, failing to reject the null hypothesis of a unit root.
  • KPSS Test: Most variables produced test statistics above the 1% critical value of 0.739, indicating non-stationarity. All variables became stationary after differencing.

While ndiffs() returned 2 for Income and EV_Chargers, all six variables were differenced once to maintain consistent variable lengths required for tslm(). Residual p-values for all first-differenced variables were greater than 0.05, confirming IID residuals with no significant autocorrelation.

Model Selection

Four model specifications were tested:

Model Description Adj. R² Residuals IID? Selected?
fit1 Undifferenced TSLM No (non-stationary) No
fit2 First-differenced TSLM 0.7608 Yes (p = 0.531) Yes
fit3 Second-differenced TSLM 0.8604 No (p = 0.020) No
fit4 First-differenced, rebates excluded Poor fit No

Results

Fitted Multivariate OLS Regression (fit2 — First-Differenced Variables)

Variable Coefficient Std. Error t-Value p-Value
Intercept -3,168.83 7,145.54 -0.443 0.663
gasprices_d1 26,992.32 9,072.95 2.975 0.00811 **
income_d1 0.64 2.48 0.258 0.800
evrange_d1 82.23 157.65 0.522 0.608
evchargers_d1 1.88 0.55 3.400 0.00319 **
rebates_d1 2.02 0.25 7.962 0.000000262 ***

Model fit: Residual Std. Error = 20,800 on 18 df | Adjusted R² = 0.7608 | F-statistic = 15.63 (p = 0.0000053)

Key Findings

  • Gasoline prices have a positive and statistically significant effect on EV sales (t = 2.975, p = 0.008). Every $1 increase in gasoline prices is associated with approximately 26,992 more EVs sold. We reject the null hypothesis.
  • EV Chargers are statistically significant (t = 3.400, p = 0.003). Each additional charger is associated with ~1.88 more EVs sold.
  • Rebates are highly statistically significant (t = 7.962, p ≈ 0). Each additional rebate issued is associated with ~2.02 more EVs sold, notably at odds with the ECON 103A findings, suggesting rebates become significant once gasoline prices are accounted for.
  • Income and EV Range were not statistically significant at the 5% level.
  • The model's high residual standard error (20,800) reflects reduced precision, likely due to omitted variables and the use of annual rather than monthly or weekly data. The fitted model underestimates EV sales around 2009 and 2020, likely reflecting the economic impacts of the Great Recession and the COVID-19 pandemic.

How to Run

  1. Clone the repository
  2. Open gas_prices_ev_sales.Rproj in RStudio — this sets the working directory automatically
  3. Install required packages if needed:
    install.packages(c("here", "fpp2", "fpp3", "tseries", "tsibble", "tsibbledata",
                       "ggplot2", "fable", "dplyr", "tidyverse", "seasonal", "forecast",
                       "GGally", "urca", "readxl"))
  4. Run gas_prices_ev_sales.R

The script will:

  • Load and convert data to a time series object
  • Produce individual time series plots for all six variables
  • Generate summary statistics and standard deviations for each variable
  • Run stationarity tests (ACF, ADF, KPSS) on each variable and its differenced counterpart
  • Difference all variables to first order and verify IID residuals
  • Estimate and compare four model specifications (fit1–fit4)
  • Plot the selected model (fit2) against actual annual EV sales in California

Connection to Prior Work

This paper extends research from ECON 103A (The Impact of Financial Incentives on EV Adoption Rates, Fall 2023), which found that financial incentives were not statistically significant when income was controlled for. By incorporating gasoline prices into the model, this paper finds that rebates do in fact have a statistically significant impact on EV sales, suggesting the earlier model may have suffered from omitted variable bias by excluding gasoline prices.


References

  1. U.S. Environmental Protection Agency. (2020). Causes of Climate Change. https://www.epa.gov/climatechange-science/causes-climate-change
  2. California Environmental Protection Agency. (2020). California Climate Dashboard. https://calepa.ca.gov/climate-dashboard
  3. Hoogland, K., Kurani, K. S., Hardman, S., Chakraborty, D., & Davis, A. (2022). Understanding the Impact of Charging Infrastructure on the Consideration to Purchase an Electric Vehicle in California. eScholarship, UC. https://escholarship.org/uc/item/6jx7m6pd
  4. Bushnell, J. B., Muehlegger, E., & Rapson, D. S. (2022). Energy Prices and Electric Vehicle Adoption. NBER. https://www.nber.org/system/files/working_papers/w29842/w29842.pdf
  5. University of California, Los Angeles. (2017). Factors Affecting Plug-In Electric Vehicle Sales in California. Final Report, Contract no. 13-303 (pp. 166–178). https://ww2.arb.ca.gov/sites/default/files/classic/research/apr/past/13-303.pdf
  6. Lee, Y. A., & Nilsson, I. (2024). An Examination of the Effect of External Factors on Zero-Emission Vehicle Adoption in the United States. Travel Behavior and Society, 38. https://doi.org/10.1016/j.tbs.2024.100904
  7. U.S. Energy Information Administration. (2024). California All Grades All Formulations Retail Gasoline Prices. https://www.eia.gov/dnav/pet/hist/LeafHandler.ashx?n=pet&s=emm_epm0_pte_sca_dpg&f=a
  8. U.S. Bureau of Economic Analysis & FRED. (2024). Per Capita Personal Income in California. https://fred.stlouisfed.org/series/CAPCPI
  9. California Energy Commission. (2024). ZEV and Infrastructure Stats Data. https://www.energy.ca.gov/files/zev-and-infrastructure-stats-data
  10. U.S. Department of Energy. (2023). Top Range for Model Year 2023 EVs was 516 Miles on a Single Charge. https://www.energy.gov/eere/vehicles/articles/fotw-1323-january-1-2024-top-range-model-year-2023-evs-was-516-miles-single
  11. Center for Sustainable Energy. (2024). California Air Resources Board Clean Vehicle Rebate Project, Rebate Statistics. https://cleanvehiclerebate.org/en/rebate-statistics

About

Undergraduate capstone project analyzing the relationship between gasoline prices and EV sales in California using a multivariate time series OLS regression model.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages