Skip to content

Disentangling driver & constructor performance in the F1 hybrid era

License

Notifications You must be signed in to change notification settings

vankesteren/f1model

Repository files navigation

Bayesian Analysis of Formula One Race Results

DOI

Repository containing code, data & presentation accompanying the manuscript Bayesian Analysis of Formula One Race Results: Disentangling Driver Skill and Constructor Advantage.

Note: version v1.0 used Beta regression via the brms package rather than the current cmdstanr rank-ordered logit implementation. The model_comparison folder compares the old and the current implementation.

The scripts contain the following:

Script Contents
01_prep_data.R Data preparation, data joining from database f1db_csv
02_eda.R Some visualisation and exploratory data analysis
03_model.R Creating and estimating models with different predictors
04_compare.R Performing model comparison
05_check.R MCMC validation, posterior predictive checks
06_infer.R Inferences using posteriors of parameters
07_predict.R Counterfactual predictions

Data f1db_csv obtained from Ergast developer API on 2022-02-17 uploaded with permission. All data objects (.rds and .csv files) are CC BY 4.0 licensed. Code is MIT licensed.

Disclaimer: the ratings shown below are the result of a statistical model and its accompanying simplifying assumptions, estimated using only position data from 2014-2021. Please do not take the ratings as absolute truth.

driver talent plot

constructor advantage plot

constructor form plot

NB: Presentation picture sources are in the notes.

About

Disentangling driver & constructor performance in the F1 hybrid era

Resources

License

Stars

Watchers

Forks

Packages

No packages published