# 1. Calculate the Ratio based on your 2025 figures# Projected Host License Holders 2025 (Linear extrapolation of your data): ~2,538,839# https://docs.google.com/spreadsheets/d/1znDbWVXO2A5uSKiVazQwFJKZcrrH-VZXnQsG-INBQ-w/edit?gid=819465529#gid=819465529# influx of more than 100,000 F1 fans.# https://gpdestinations.com/2025-canadian-grand-prix-weekend-attendance/# Haldenby, N. (2025, June 16). **2025 Canadian Grand Prix weekend attendance exceeds 350,000**. GPDestinations. https://gpdestinations.com/2025-canadian-grand-prix-weekend-attendance/# Attendance numbers have grown in Montreal in recent years. The last race before the coronavirus pandemic, in 2019, # had a weekend total of 307,000 spectators. When F1 returned in 2022, the race weekend had 338,000 attendees. # License hodlers in 2019: 2449509 (Google docs)# Expected Visitors 2019: 350,000#https://montreal.eater.com/2022/6/13/23166358/montreal-grand-prix-party-restaurants-bars-clubs-f1-eventsvisitor_ratio <-307000/2449509# Returns ~0.125# 2. Prepare the dataset# We create a specific dataframe for the model to ensure the offset is calculated correctlydf_model_4dsumm <-subset(collisions_weather_corr_rect_pre_post, grepl("^Pre|^Exp", exposure_window) & treated_sens ==TRUE)# 3. Create the Adjusted Offset# Logic: Total_Population = Locals + Visitors# Where Visitors = Locals * visitor_ratio# Therefore: Total_Population = Locals * (1 + visitor_ratio)# Initialize with original license holdersdf_model_4dsumm$population_adjusted <- df_model_4dsumm$exp_lic# Identify exposure rows (Race periods)is_exposure_4dsumm <-grepl("^Exp", df_model_4dsumm$exposure_window)# Apply the increase ONLY to the exposure perioddf_model_4dsumm$population_adjusted[is_exposure_4dsumm] <- df_model_4dsumm$population_adjusted[is_exposure_4dsumm] * (1+ visitor_ratio)
collisions_weather_corr_rect$non_high_speed<- collisions_weather_corr_rect$nb_collisions- collisions_weather_corr_rect$velocidadcollisions_weather_corr_rect$prueba<- collisions_weather_corr_rect$nb_collisions- (collisions_weather_corr_rect$velocidad+ collisions_weather_corr_rect$alcohol)collisions_weather_corr_rect$nb_blese_any<-collisions_weather_corr_rect$nb_blese_grave_c+collisions_weather_corr_rect$nb_blese_leger_cstopifnot(all(collisions_weather_corr_rect$non_high_speed >=0, na.rm =TRUE))# 2) Is nb_blese_any consistent with severity components? (if you have them)# nb_blese_any should often equal deaths + serious + minor (depending on definitions)summary(collisions_weather_corr_rect$nb_blese_any - (collisions_weather_corr_rect$nb_mort_c + collisions_weather_corr_rect$nb_blese_grave_c + collisions_weather_corr_rect$nb_blese_leger_c))total_casualty <-with(collisions_weather_corr_rect, nb_mort_c + nb_blese_grave_c + nb_blese_leger_c)summary(total_casualty - collisions_weather_corr_rect$velocidad)sum((total_casualty - collisions_weather_corr_rect$velocidad) <0, na.rm =TRUE)cat("“non–high-speed casualty collisions (fatal + injured)")message("“As a specificity check, we repeated the analysis using non–high-speed casualty collisions (fatal and non-fatal injuries) as a negative-control outcome")
“As a specificity check, we repeated the analysis using
non–high-speed casualty collisions (fatal and non-fatal injuries) as a negative-control outcome