#Dataset Crash Reporting - Drivers Data Source- https://catalog.data.gov/dataset/crash-reporting-drivers-data (Montgomery County of Maryland)

#Introduction Research Question How do weather conditions roadway surface conditions and driver distraction affect the likelihood that a driver is injured in a crash?

Road traffic injuries represent a major public health concern in the United States and worldwide. Motor vehicle crashes contribute substantially to morbidity, mortality, and economic burden. Understanding situational and behavioral risk factors is essential for injury prevention and evidence based policy development. Environmental conditions, such as weather and road surface quality, directly affect vehicle handling, braking distance, and driver visibility. Behavioral factors, including driver distraction, influence reaction time, decision making, and situational awareness. These factors are commonly recorded in crash reporting systems but are not always systematically analyzed in relation to injury outcomes.

This study uses the Crash Reporting – Drivers Data dataset provided through an academic data repository. Each observation in the dataset represents an individual driver involved in a police reported crash. The dataset contains environmental and behavioral variables relevant to crash circumstances, including weather conditions, roadway surface conditions, and driver distraction status. The primary outcome variable is driver injury severity, categorized as injury versus no injury. Logistic regression is used to estimate the probability of injury because the dependent variable is binary. This modeling approach allows estimation of the independent effects of each predictor while controlling for other variables in the model.

#Importing datasets

crash <- read_csv("Crash_Reporting_-_Drivers_Data.csv")
## Rows: 206309 Columns: 39
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (35): Report Number, Local Case Number, Agency Name, ACRS Report Type, C...
## dbl  (4): Speed Limit, Vehicle Year, Latitude, Longitude
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#Look at structure and basic summaries

glimpse(crash)
## Rows: 206,309
## Columns: 39
## $ `Report Number`                 <chr> "MCP3126006X", "MCP2349001B", "MCP2965…
## $ `Local Case Number`             <chr> "250037402", "250037516", "250033157",…
## $ `Agency Name`                   <chr> "MONTGOMERY", "MONTGOMERY", "MONTGOMER…
## $ `ACRS Report Type`              <chr> "Injury Crash", "Property Damage Crash…
## $ `Crash Date/Time`               <chr> "08/21/2025 05:21:00 PM", "08/22/2025 …
## $ `Route Type`                    <chr> "Maryland (State) Route", "Interstate …
## $ `Road Name`                     <chr> NA, "EISENHOWER MEMORIAL HWY", NA, NA,…
## $ `Cross-Street Name`             <chr> NA, NA, "NEW HAMPSHIRE AVE (SB/L) NORB…
## $ `Off-Road Description`          <chr> NA, NA, NA, NA, "Parking Lot Way      …
## $ Municipality                    <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA…
## $ `Related Non-Motorist`          <chr> NA, NA, NA, NA, NA, "Pedestrian", "Ped…
## $ `Collision Type`                <chr> "Front to Rear", "Single Vehicle", "Si…
## $ Weather                         <chr> "Clear", "Clear", "Clear", "Clear", "C…
## $ `Surface Condition`             <chr> "Dry", "Dry", "Dry", "Dry", NA, "Wet",…
## $ Light                           <chr> "Daylight", "Daylight", "Daylight", "D…
## $ `Traffic Control`               <chr> "No Controls", "No Controls", "Traffic…
## $ `Driver Substance Abuse`        <chr> "Not Suspect of Alcohol Use, Not Suspe…
## $ `Non-Motorist Substance Abuse`  <chr> NA, NA, NA, NA, NA, "Not Suspect of Al…
## $ `Person ID`                     <chr> "BB3CB0F3-5A89-45FB-9516-48DDDB92B0A9"…
## $ `Driver At Fault`               <chr> "Yes", "No", "No", "Yes", "No", "No", …
## $ `Injury Severity`               <chr> "No Apparent Injury", NA, "No Apparent…
## $ Circumstance                    <chr> "Followed Too Closely", NA, NA, "Follo…
## $ `Driver Distracted By`          <chr> "Other Action (looking away from task,…
## $ `Drivers License State`         <chr> "MD", NA, "CO", "MD", NA, "MD", "MD", …
## $ `Vehicle ID`                    <chr> "768C98FA-C137-47BC-BE44-EE3BA4B95F66"…
## $ `Vehicle Damage Extent`         <chr> "Superficial", "Vehicle Not at Scene",…
## $ `Vehicle First Impact Location` <chr> "Twelve O Clock", "Vehicle Not at Scen…
## $ `Vehicle Body Type`             <chr> "Passenger Car", NA, "Passenger Car", …
## $ `Vehicle Movement`              <chr> "Moving Constant Speed", "Moving Const…
## $ `Vehicle Going Dir`             <chr> "Northbound", "Northbound", "Westbound…
## $ `Speed Limit`                   <dbl> 40, 55, 40, 30, 0, 25, 0, 25, 10, 35, …
## $ `Driverless Vehicle`            <chr> "No", "No", "No", "No", "No", "No", "N…
## $ `Parked Vehicle`                <chr> "No", "No", "No", "No", "No", "No", "N…
## $ `Vehicle Year`                  <dbl> 2013, 0, 2023, 2003, 2023, 2016, 2025,…
## $ `Vehicle Make`                  <chr> "KIA", NA, "LEXUS", "TOYOTA", "SUBARU"…
## $ `Vehicle Model`                 <chr> "SOUL", NA, "RX", "SIENNA", "IMPREZA",…
## $ Latitude                        <dbl> 39.21980, 39.18018, 39.12122, 39.20793…
## $ Longitude                       <dbl> -77.25742, -77.25066, -76.98891, -77.1…
## $ Location                        <chr> "(39.219796, -77.25741635)", "(39.1801…
dim(crash)
## [1] 206309     39
summary(crash)
##  Report Number      Local Case Number  Agency Name        ACRS Report Type  
##  Length:206309      Length:206309      Length:206309      Length:206309     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  Crash Date/Time     Route Type         Road Name         Cross-Street Name 
##  Length:206309      Length:206309      Length:206309      Length:206309     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  Off-Road Description Municipality       Related Non-Motorist
##  Length:206309        Length:206309      Length:206309       
##  Class :character     Class :character   Class :character    
##  Mode  :character     Mode  :character   Mode  :character    
##                                                              
##                                                              
##                                                              
##  Collision Type       Weather          Surface Condition     Light          
##  Length:206309      Length:206309      Length:206309      Length:206309     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  Traffic Control    Driver Substance Abuse Non-Motorist Substance Abuse
##  Length:206309      Length:206309          Length:206309               
##  Class :character   Class :character       Class :character            
##  Mode  :character   Mode  :character       Mode  :character            
##                                                                        
##                                                                        
##                                                                        
##   Person ID         Driver At Fault    Injury Severity    Circumstance      
##  Length:206309      Length:206309      Length:206309      Length:206309     
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  Driver Distracted By Drivers License State  Vehicle ID       
##  Length:206309        Length:206309         Length:206309     
##  Class :character     Class :character      Class :character  
##  Mode  :character     Mode  :character      Mode  :character  
##                                                               
##                                                               
##                                                               
##  Vehicle Damage Extent Vehicle First Impact Location Vehicle Body Type 
##  Length:206309         Length:206309                 Length:206309     
##  Class :character      Class :character              Class :character  
##  Mode  :character      Mode  :character              Mode  :character  
##                                                                        
##                                                                        
##                                                                        
##  Vehicle Movement   Vehicle Going Dir   Speed Limit    Driverless Vehicle
##  Length:206309      Length:206309      Min.   : 0.00   Length:206309     
##  Class :character   Class :character   1st Qu.:25.00   Class :character  
##  Mode  :character   Mode  :character   Median :35.00   Mode  :character  
##                                        Mean   :32.18                     
##                                        3rd Qu.:40.00                     
##                                        Max.   :75.00                     
##  Parked Vehicle      Vehicle Year  Vehicle Make       Vehicle Model     
##  Length:206309      Min.   :   0   Length:206309      Length:206309     
##  Class :character   1st Qu.:2006   Class :character   Class :character  
##  Mode  :character   Median :2012   Mode  :character   Mode  :character  
##                     Mean   :1965                                        
##                     3rd Qu.:2016                                        
##                     Max.   :9999                                        
##     Latitude       Longitude        Location        
##  Min.   :37.72   Min.   :-79.49   Length:206309     
##  1st Qu.:39.02   1st Qu.:-77.19   Class :character  
##  Median :39.07   Median :-77.11   Mode  :character  
##  Mean   :39.08   Mean   :-77.11                     
##  3rd Qu.:39.14   3rd Qu.:-77.04                     
##  Max.   :39.99   Max.   :-75.53

#Data Analysis

#Keep only relevant variables and clean

crash_clean <- crash %>%
select(
`Injury Severity`,
Weather,
`Surface Condition`,
`Driver Distracted By`
) %>%
  filter(
!is.na(`Injury Severity`),
!is.na(Weather),
!is.na(`Surface Condition`),
!is.na(`Driver Distracted By`)
) %>%
mutate(
injury_bin = ifelse(`Injury Severity` %in% c("Injury", "Fatal Injury"), 1, 0),
Weather = as.factor(Weather),
`Surface Condition` = as.factor(`Surface Condition`),
`Driver Distracted By` = as.factor(`Driver Distracted By`)
)
#Grouped summary using dplyr

crash_clean %>%
  filter(injury_bin == 1) %>%
  group_by(Weather, `Surface Condition`, `Driver Distracted By`) %>%
  summarise(
    total_injured = n()
  ) %>%
  arrange(desc(total_injured))
## `summarise()` has grouped output by 'Weather', 'Surface Condition'. You can
## override using the `.groups` argument.
## # A tibble: 7 × 4
## # Groups:   Weather, Surface Condition [4]
##   Weather `Surface Condition` `Driver Distracted By` total_injured
##   <fct>   <fct>               <fct>                          <int>
## 1 Clear   Dry                 Unknown                           22
## 2 Clear   Dry                 Not Distracted                     6
## 3 Clear   Dry                 Talking/listening                  2
## 4 Cloudy  Dry                 Not Distracted                     1
## 5 Cloudy  Dry                 Unknown                            1
## 6 Cloudy  Wet                 Unknown                            1
## 7 Rain    Wet                 Unknown                            1

#Interpretation of Data Analysis

The exploratory data analysis revealed meaningful patterns in crash related injury outcomes across environmental and behavioral conditions. A substantial proportion of no apparent injury and fatal injury cases occurred under common weather conditions, particularly clear and rainy weather, indicating that injury risk is not limited to severe weather events. Roadway surface conditions such as dry and wet surfaces showed high fatal injury counts, suggesting that surface condition alone does not fully explain injury likelihood but may interact with other factors such as driver behavior.

Driver distraction was frequently observed in injury cases, with certain distraction types appearing more often among injured drivers. The grouped summaries demonstrated that specific combinations of adverse weather, poor surface conditions, and driver distraction were associated with higher fatal injury counts. These findings suggest that both environmental and behavioral factors contribute to injury risk and should be considered simultaneously in modeling crash outcomes.

Overall, the analysis indicated sufficient variability in the predictor variables to support logistic regression modeling and justified the inclusion of weather conditions, surface conditions, and driver distraction as relevant predictors of driver injury.

#Barplot

crash_clean %>%
  filter(injury_bin == 1) %>%
  count(Weather, `Surface Condition`, `Driver Distracted By`, sort = TRUE) %>%
  ggplot(aes(x = reorder(paste(Weather, `Surface Condition`, `Driver Distracted By`, sep = " | "), n),
             y = n)) +
  geom_col() +
  coord_flip() +
  labs(
    title = "Injured Drivers by Weather, Surface, and Driver Distraction",
    x = "Weather | Surface | Driver Distraction",
    y = "Number of Injured Drivers"
  )

#Interpretation of bar plot

The bar plot shows the distribution of driver injuries across weather conditions, driver distraction, and road surface conditions. Most injuries occur in clear weather, which reflects the higher volume of traffic during normal conditions. Fewer injuries are reported in rainy or snowy conditions, though these conditions may carry a higher risk per mile driven. Distraction is a significant factor, with phone use and in-car activities contributing to a notable share of injuries. Road surface also affects injury rates, with most injuries occurring on dry roads. Wet or icy roads account for fewer injuries but tend to result in more severe outcomes. Fatal injuries appear less frequently than minor injuries but are associated with high-risk situations such as distracted driving, poor surface conditions, or high speeds. Overall the plot indicates that both human behavior and environmental conditions influence driver injuries. Prevention strategies should focus on reducing distraction and increasing awareness of road and weather risks.

#Logistic regression model

# Fit logistic regression model
model <- glm(injury_bin ~ Weather + `Surface Condition` + `Driver Distracted By`,
             data = crash_clean,
             family = binomial)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
# Model summary
summary(model)
## 
## Call:
## glm(formula = injury_bin ~ Weather + `Surface Condition` + `Driver Distracted By`, 
##     family = binomial, data = crash_clean)
## 
## Coefficients: (1 not defined because of singularities)
##                                                                           Estimate
## (Intercept)                                                             -2.084e+08
## WeatherBlowing Snow                                                      2.084e+08
## WeatherBLOWING SNOW                                                     -3.310e-01
## WeatherClear                                                             2.084e+08
## WeatherCLEAR                                                            -2.500e-01
## WeatherCloudy                                                            2.084e+08
## WeatherCLOUDY                                                           -2.650e-01
## WeatherFog, Smog, Smoke                                                  2.084e+08
## WeatherFOGGY                                                            -3.377e-01
## WeatherFreezing Rain Or Freezing Drizzle                                 2.084e+08
## WeatherN/A                                                              -2.587e-01
## WeatherOTHER                                                            -1.733e-01
## WeatherRain                                                              2.084e+08
## WeatherRAINING                                                          -6.487e-02
## WeatherSevere Crosswinds                                                 2.084e+08
## WeatherSEVERE WINDS                                                     -9.695e-02
## WeatherSLEET                                                            -3.615e-02
## WeatherSleet Or Hail                                                     2.084e+08
## WeatherSnow                                                              2.084e+08
## WeatherSNOW                                                             -3.883e-02
## WeatherUnknown                                                           2.084e+08
## WeatherUNKNOWN                                                           1.770e-02
## WeatherWINTRY MIX                                                        6.591e-02
## `Surface Condition`DRY                                                   2.084e+08
## `Surface Condition`ICE                                                   2.084e+08
## `Surface Condition`Ice/Frost                                            -1.902e+01
## `Surface Condition`Mud, Dirt, Gravel                                    -1.870e+01
## `Surface Condition`MUD, DIRT, GRAVEL                                     2.084e+08
## `Surface Condition`N/A                                                   2.084e+08
## `Surface Condition`Oil                                                  -1.869e+01
## `Surface Condition`OIL                                                   2.084e+08
## `Surface Condition`Other                                                -1.957e+01
## `Surface Condition`OTHER                                                 2.084e+08
## `Surface Condition`Sand                                                 -2.001e+01
## `Surface Condition`SAND                                                  2.084e+08
## `Surface Condition`Slush                                                -1.888e+01
## `Surface Condition`SLUSH                                                 2.084e+08
## `Surface Condition`Snow                                                 -1.762e+01
## `Surface Condition`SNOW                                                  2.084e+08
## `Surface Condition`UNKNOWN                                               2.084e+08
## `Surface Condition`Water (standing, moving)                             -1.920e+01
## `Surface Condition`WATER(STANDING/MOVING)                                2.084e+08
## `Surface Condition`Wet                                                  -4.747e-01
## `Surface Condition`WET                                                   2.084e+08
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                       -6.275e-07
## `Driver Distracted By`BY OTHER OCCUPANTS                                -1.685e-07
## `Driver Distracted By`DIALING CELLULAR PHONE                             9.095e-06
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT       1.036e-05
## `Driver Distracted By`EATING OR DRINKING                                -9.807e-06
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                     7.897e-06
## `Driver Distracted By`LOOKED BUT DID NOT SEE                            -5.468e-06
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)  -2.090e+01
## `Driver Distracted By`NO DRIVER PRESENT                                  2.155e-06
## `Driver Distracted By`Not Distracted                                    -2.367e+00
## `Driver Distracted By`NOT DISTRACTED                                     8.839e-06
## `Driver Distracted By`Other Action (looking away from task, etc.)       -2.051e+01
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                       1.114e-05
## `Driver Distracted By`OTHER DISTRACTION                                 -4.229e-06
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)  9.803e-06
## `Driver Distracted By`SMOKING RELATED                                   -4.177e-07
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE             4.833e-06
## `Driver Distracted By`Talking/listening                                  2.042e+00
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                      5.054e-06
## `Driver Distracted By`Unknown                                                   NA
## `Driver Distracted By`UNKNOWN                                            8.605e-07
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE           4.598e-06
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE    1.696e-07
##                                                                         Std. Error
## (Intercept)                                                              1.451e+11
## WeatherBlowing Snow                                                      1.451e+11
## WeatherBLOWING SNOW                                                      8.629e+04
## WeatherClear                                                             1.451e+11
## WeatherCLEAR                                                             7.882e+04
## WeatherCloudy                                                            1.451e+11
## WeatherCLOUDY                                                            7.887e+04
## WeatherFog, Smog, Smoke                                                  1.451e+11
## WeatherFOGGY                                                             8.013e+04
## WeatherFreezing Rain Or Freezing Drizzle                                 1.451e+11
## WeatherN/A                                                               7.888e+04
## WeatherOTHER                                                             8.090e+04
## WeatherRain                                                              1.451e+11
## WeatherRAINING                                                           7.894e+04
## WeatherSevere Crosswinds                                                 1.451e+11
## WeatherSEVERE WINDS                                                      8.320e+04
## WeatherSLEET                                                             8.195e+04
## WeatherSleet Or Hail                                                     1.451e+11
## WeatherSnow                                                              1.451e+11
## WeatherSNOW                                                              7.974e+04
## WeatherUnknown                                                           1.451e+11
## WeatherUNKNOWN                                                           8.102e+04
## WeatherWINTRY MIX                                                        8.051e+04
## `Surface Condition`DRY                                                   1.451e+11
## `Surface Condition`ICE                                                   1.451e+11
## `Surface Condition`Ice/Frost                                             2.549e+04
## `Surface Condition`Mud, Dirt, Gravel                                     1.347e+05
## `Surface Condition`MUD, DIRT, GRAVEL                                     1.451e+11
## `Surface Condition`N/A                                                   1.451e+11
## `Surface Condition`Oil                                                   3.569e+05
## `Surface Condition`OIL                                                   1.451e+11
## `Surface Condition`Other                                                 4.981e+04
## `Surface Condition`OTHER                                                 1.451e+11
## `Surface Condition`Sand                                                  1.936e+05
## `Surface Condition`SAND                                                  1.451e+11
## `Surface Condition`Slush                                                 3.586e+04
## `Surface Condition`SLUSH                                                 1.451e+11
## `Surface Condition`Snow                                                  2.120e+04
## `Surface Condition`SNOW                                                  1.451e+11
## `Surface Condition`UNKNOWN                                               1.451e+11
## `Surface Condition`Water (standing, moving)                              1.061e+05
## `Surface Condition`WATER(STANDING/MOVING)                                1.451e+11
## `Surface Condition`Wet                                                   1.052e+00
## `Surface Condition`WET                                                   1.451e+11
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                        3.820e+04
## `Driver Distracted By`BY OTHER OCCUPANTS                                 3.464e+04
## `Driver Distracted By`DIALING CELLULAR PHONE                             5.854e+04
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT       3.205e+04
## `Driver Distracted By`EATING OR DRINKING                                 3.917e+04
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                     3.042e+04
## `Driver Distracted By`LOOKED BUT DID NOT SEE                             3.002e+04
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)   5.369e+04
## `Driver Distracted By`NO DRIVER PRESENT                                  3.845e+04
## `Driver Distracted By`Not Distracted                                     4.280e-01
## `Driver Distracted By`NOT DISTRACTED                                     2.994e+04
## `Driver Distracted By`Other Action (looking away from task, etc.)        7.828e+03
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                       3.503e+04
## `Driver Distracted By`OTHER DISTRACTION                                  3.058e+04
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)  3.555e+04
## `Driver Distracted By`SMOKING RELATED                                    7.448e+04
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE             3.693e+04
## `Driver Distracted By`Talking/listening                                  7.455e-01
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                      5.179e+04
## `Driver Distracted By`Unknown                                                   NA
## `Driver Distracted By`UNKNOWN                                            2.999e+04
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE           5.340e+04
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE    4.859e+04
##                                                                         z value
## (Intercept)                                                              -0.001
## WeatherBlowing Snow                                                       0.001
## WeatherBLOWING SNOW                                                       0.000
## WeatherClear                                                              0.001
## WeatherCLEAR                                                              0.000
## WeatherCloudy                                                             0.001
## WeatherCLOUDY                                                             0.000
## WeatherFog, Smog, Smoke                                                   0.001
## WeatherFOGGY                                                              0.000
## WeatherFreezing Rain Or Freezing Drizzle                                  0.001
## WeatherN/A                                                                0.000
## WeatherOTHER                                                              0.000
## WeatherRain                                                               0.001
## WeatherRAINING                                                            0.000
## WeatherSevere Crosswinds                                                  0.001
## WeatherSEVERE WINDS                                                       0.000
## WeatherSLEET                                                              0.000
## WeatherSleet Or Hail                                                      0.001
## WeatherSnow                                                               0.001
## WeatherSNOW                                                               0.000
## WeatherUnknown                                                            0.001
## WeatherUNKNOWN                                                            0.000
## WeatherWINTRY MIX                                                         0.000
## `Surface Condition`DRY                                                    0.001
## `Surface Condition`ICE                                                    0.001
## `Surface Condition`Ice/Frost                                             -0.001
## `Surface Condition`Mud, Dirt, Gravel                                      0.000
## `Surface Condition`MUD, DIRT, GRAVEL                                      0.001
## `Surface Condition`N/A                                                    0.001
## `Surface Condition`Oil                                                    0.000
## `Surface Condition`OIL                                                    0.001
## `Surface Condition`Other                                                  0.000
## `Surface Condition`OTHER                                                  0.001
## `Surface Condition`Sand                                                   0.000
## `Surface Condition`SAND                                                   0.001
## `Surface Condition`Slush                                                 -0.001
## `Surface Condition`SLUSH                                                  0.001
## `Surface Condition`Snow                                                  -0.001
## `Surface Condition`SNOW                                                   0.001
## `Surface Condition`UNKNOWN                                                0.001
## `Surface Condition`Water (standing, moving)                               0.000
## `Surface Condition`WATER(STANDING/MOVING)                                 0.001
## `Surface Condition`Wet                                                   -0.451
## `Surface Condition`WET                                                    0.001
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                         0.000
## `Driver Distracted By`BY OTHER OCCUPANTS                                  0.000
## `Driver Distracted By`DIALING CELLULAR PHONE                              0.000
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT        0.000
## `Driver Distracted By`EATING OR DRINKING                                  0.000
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                      0.000
## `Driver Distracted By`LOOKED BUT DID NOT SEE                              0.000
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)    0.000
## `Driver Distracted By`NO DRIVER PRESENT                                   0.000
## `Driver Distracted By`Not Distracted                                     -5.530
## `Driver Distracted By`NOT DISTRACTED                                      0.000
## `Driver Distracted By`Other Action (looking away from task, etc.)        -0.003
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                        0.000
## `Driver Distracted By`OTHER DISTRACTION                                   0.000
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)   0.000
## `Driver Distracted By`SMOKING RELATED                                     0.000
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE              0.000
## `Driver Distracted By`Talking/listening                                   2.740
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                       0.000
## `Driver Distracted By`Unknown                                                NA
## `Driver Distracted By`UNKNOWN                                             0.000
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE            0.000
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE     0.000
##                                                                         Pr(>|z|)
## (Intercept)                                                              0.99885
## WeatherBlowing Snow                                                      0.99885
## WeatherBLOWING SNOW                                                      1.00000
## WeatherClear                                                             0.99885
## WeatherCLEAR                                                             1.00000
## WeatherCloudy                                                            0.99885
## WeatherCLOUDY                                                            1.00000
## WeatherFog, Smog, Smoke                                                  0.99885
## WeatherFOGGY                                                             1.00000
## WeatherFreezing Rain Or Freezing Drizzle                                 0.99885
## WeatherN/A                                                               1.00000
## WeatherOTHER                                                             1.00000
## WeatherRain                                                              0.99885
## WeatherRAINING                                                           1.00000
## WeatherSevere Crosswinds                                                 0.99885
## WeatherSEVERE WINDS                                                      1.00000
## WeatherSLEET                                                             1.00000
## WeatherSleet Or Hail                                                     0.99885
## WeatherSnow                                                              0.99885
## WeatherSNOW                                                              1.00000
## WeatherUnknown                                                           0.99885
## WeatherUNKNOWN                                                           1.00000
## WeatherWINTRY MIX                                                        1.00000
## `Surface Condition`DRY                                                   0.99885
## `Surface Condition`ICE                                                   0.99885
## `Surface Condition`Ice/Frost                                             0.99940
## `Surface Condition`Mud, Dirt, Gravel                                     0.99989
## `Surface Condition`MUD, DIRT, GRAVEL                                     0.99885
## `Surface Condition`N/A                                                   0.99885
## `Surface Condition`Oil                                                   0.99996
## `Surface Condition`OIL                                                   0.99885
## `Surface Condition`Other                                                 0.99969
## `Surface Condition`OTHER                                                 0.99885
## `Surface Condition`Sand                                                  0.99992
## `Surface Condition`SAND                                                  0.99885
## `Surface Condition`Slush                                                 0.99958
## `Surface Condition`SLUSH                                                 0.99885
## `Surface Condition`Snow                                                  0.99934
## `Surface Condition`SNOW                                                  0.99885
## `Surface Condition`UNKNOWN                                               0.99885
## `Surface Condition`Water (standing, moving)                              0.99986
## `Surface Condition`WATER(STANDING/MOVING)                                0.99885
## `Surface Condition`Wet                                                   0.65186
## `Surface Condition`WET                                                   0.99885
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                        1.00000
## `Driver Distracted By`BY OTHER OCCUPANTS                                 1.00000
## `Driver Distracted By`DIALING CELLULAR PHONE                             1.00000
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT       1.00000
## `Driver Distracted By`EATING OR DRINKING                                 1.00000
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                     1.00000
## `Driver Distracted By`LOOKED BUT DID NOT SEE                             1.00000
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)   0.99969
## `Driver Distracted By`NO DRIVER PRESENT                                  1.00000
## `Driver Distracted By`Not Distracted                                     3.2e-08
## `Driver Distracted By`NOT DISTRACTED                                     1.00000
## `Driver Distracted By`Other Action (looking away from task, etc.)        0.99791
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                       1.00000
## `Driver Distracted By`OTHER DISTRACTION                                  1.00000
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)  1.00000
## `Driver Distracted By`SMOKING RELATED                                    1.00000
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE             1.00000
## `Driver Distracted By`Talking/listening                                  0.00615
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                      1.00000
## `Driver Distracted By`Unknown                                                 NA
## `Driver Distracted By`UNKNOWN                                            1.00000
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE           1.00000
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE    1.00000
##                                                                            
## (Intercept)                                                                
## WeatherBlowing Snow                                                        
## WeatherBLOWING SNOW                                                        
## WeatherClear                                                               
## WeatherCLEAR                                                               
## WeatherCloudy                                                              
## WeatherCLOUDY                                                              
## WeatherFog, Smog, Smoke                                                    
## WeatherFOGGY                                                               
## WeatherFreezing Rain Or Freezing Drizzle                                   
## WeatherN/A                                                                 
## WeatherOTHER                                                               
## WeatherRain                                                                
## WeatherRAINING                                                             
## WeatherSevere Crosswinds                                                   
## WeatherSEVERE WINDS                                                        
## WeatherSLEET                                                               
## WeatherSleet Or Hail                                                       
## WeatherSnow                                                                
## WeatherSNOW                                                                
## WeatherUnknown                                                             
## WeatherUNKNOWN                                                             
## WeatherWINTRY MIX                                                          
## `Surface Condition`DRY                                                     
## `Surface Condition`ICE                                                     
## `Surface Condition`Ice/Frost                                               
## `Surface Condition`Mud, Dirt, Gravel                                       
## `Surface Condition`MUD, DIRT, GRAVEL                                       
## `Surface Condition`N/A                                                     
## `Surface Condition`Oil                                                     
## `Surface Condition`OIL                                                     
## `Surface Condition`Other                                                   
## `Surface Condition`OTHER                                                   
## `Surface Condition`Sand                                                    
## `Surface Condition`SAND                                                    
## `Surface Condition`Slush                                                   
## `Surface Condition`SLUSH                                                   
## `Surface Condition`Snow                                                    
## `Surface Condition`SNOW                                                    
## `Surface Condition`UNKNOWN                                                 
## `Surface Condition`Water (standing, moving)                                
## `Surface Condition`WATER(STANDING/MOVING)                                  
## `Surface Condition`Wet                                                     
## `Surface Condition`WET                                                     
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                          
## `Driver Distracted By`BY OTHER OCCUPANTS                                   
## `Driver Distracted By`DIALING CELLULAR PHONE                               
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT         
## `Driver Distracted By`EATING OR DRINKING                                   
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                       
## `Driver Distracted By`LOOKED BUT DID NOT SEE                               
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)     
## `Driver Distracted By`NO DRIVER PRESENT                                    
## `Driver Distracted By`Not Distracted                                    ***
## `Driver Distracted By`NOT DISTRACTED                                       
## `Driver Distracted By`Other Action (looking away from task, etc.)          
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                         
## `Driver Distracted By`OTHER DISTRACTION                                    
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)    
## `Driver Distracted By`SMOKING RELATED                                      
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE               
## `Driver Distracted By`Talking/listening                                 ** 
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                        
## `Driver Distracted By`Unknown                                              
## `Driver Distracted By`UNKNOWN                                              
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE             
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 652.96  on 185125  degrees of freedom
## Residual deviance: 471.26  on 185060  degrees of freedom
## AIC: 603.26
## 
## Number of Fisher Scoring iterations: 25
# Confidence intervals
confint(model)
## Waiting for profiling to be done...
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
##                                                                                 2.5 %
## (Intercept)                                                             -3.303162e+10
## WeatherBlowing Snow                                                     -2.478583e+09
## WeatherBLOWING SNOW                                                     -9.856515e+02
## WeatherClear                                                            -2.418211e+09
## WeatherCLEAR                                                            -1.166338e+03
## WeatherCloudy                                                           -2.519199e+09
## WeatherCLOUDY                                                           -7.162523e+02
## WeatherFog, Smog, Smoke                                                 -2.631059e+09
## WeatherFOGGY                                                            -1.378938e+03
## WeatherFreezing Rain Or Freezing Drizzle                                -2.770118e+09
## WeatherN/A                                                              -1.716591e+03
## WeatherOTHER                                                            -1.183093e+03
## WeatherRain                                                             -2.688024e+09
## WeatherRAINING                                                          -1.499848e+03
## WeatherSevere Crosswinds                                                -2.282025e+09
## WeatherSEVERE WINDS                                                     -1.359612e+03
## WeatherSLEET                                                            -8.387095e+02
## WeatherSleet Or Hail                                                    -2.983593e+09
## WeatherSnow                                                             -2.760515e+09
## WeatherSNOW                                                             -1.158688e+03
## WeatherUnknown                                                          -2.901546e+09
## WeatherUNKNOWN                                                          -1.585746e+03
## WeatherWINTRY MIX                                                       -1.200803e+03
## `Surface Condition`DRY                                                  -1.952525e+09
## `Surface Condition`ICE                                                  -2.567907e+09
## `Surface Condition`Ice/Frost                                            -2.927345e+02
## `Surface Condition`Mud, Dirt, Gravel                                               NA
## `Surface Condition`MUD, DIRT, GRAVEL                                    -2.811174e+09
## `Surface Condition`N/A                                                  -2.739198e+09
## `Surface Condition`Oil                                                  -7.289383e+03
## `Surface Condition`OIL                                                  -1.546062e+09
## `Surface Condition`Other                                                -1.442803e+04
## `Surface Condition`OTHER                                                -2.680343e+09
## `Surface Condition`Sand                                                 -5.707609e+03
## `Surface Condition`SAND                                                 -2.597285e+09
## `Surface Condition`Slush                                                -8.025745e+02
## `Surface Condition`SLUSH                                                -2.921153e+09
## `Surface Condition`Snow                                                 -4.156692e+02
## `Surface Condition`SNOW                                                 -2.794456e+09
## `Surface Condition`UNKNOWN                                              -2.799269e+09
## `Surface Condition`Water (standing, moving)                             -2.117667e+03
## `Surface Condition`WATER(STANDING/MOVING)                               -2.733917e+09
## `Surface Condition`Wet                                                  -3.395910e+00
## `Surface Condition`WET                                                  -2.584343e+09
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                       -7.967758e+02
## `Driver Distracted By`BY OTHER OCCUPANTS                                -6.156192e+02
## `Driver Distracted By`DIALING CELLULAR PHONE                            -4.692069e+02
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT      -4.258138e+02
## `Driver Distracted By`EATING OR DRINKING                                -6.822633e+02
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                    -6.481439e+02
## `Driver Distracted By`LOOKED BUT DID NOT SEE                            -5.590099e+02
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)  -1.072882e+03
## `Driver Distracted By`NO DRIVER PRESENT                                 -6.926546e+02
## `Driver Distracted By`Not Distracted                                    -2.504615e+00
## `Driver Distracted By`NOT DISTRACTED                                    -6.472009e+02
## `Driver Distracted By`Other Action (looking away from task, etc.)       -4.656344e+03
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                      -6.567479e+02
## `Driver Distracted By`OTHER DISTRACTION                                 -6.469757e+02
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT) -7.484749e+02
## `Driver Distracted By`SMOKING RELATED                                   -1.411270e+03
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE            -4.505916e+02
## `Driver Distracted By`Talking/listening                                  2.053405e-01
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                     -5.497931e+02
## `Driver Distracted By`Unknown                                                      NA
## `Driver Distracted By`UNKNOWN                                           -5.747888e+02
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE          -1.137767e+03
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE   -6.366233e+02
##                                                                                97.5 %
## (Intercept)                                                             -6.018343e+10
## WeatherBlowing Snow                                                      3.076981e+09
## WeatherBLOWING SNOW                                                      1.208675e+03
## WeatherClear                                                             2.578657e+09
## WeatherCLEAR                                                             9.884944e+02
## WeatherCloudy                                                            3.104605e+09
## WeatherCLOUDY                                                            5.777113e+02
## WeatherFog, Smog, Smoke                                                  2.960126e+09
## WeatherFOGGY                                                             1.510081e+03
## WeatherFreezing Rain Or Freezing Drizzle                                 3.247820e+09
## WeatherN/A                                                               1.723763e+03
## WeatherOTHER                                                             9.917912e+02
## WeatherRain                                                              3.021768e+09
## WeatherRAINING                                                           1.494654e+03
## WeatherSevere Crosswinds                                                 2.817226e+09
## WeatherSEVERE WINDS                                                      1.506495e+03
## WeatherSLEET                                                             1.045357e+03
## WeatherSleet Or Hail                                                     3.400459e+09
## WeatherSnow                                                              3.262762e+09
## WeatherSNOW                                                              9.446913e+02
## WeatherUnknown                                                           3.266017e+09
## WeatherUNKNOWN                                                           1.659102e+03
## WeatherWINTRY MIX                                                        9.953040e+02
## `Surface Condition`DRY                                                   2.010436e+09
## `Surface Condition`ICE                                                   3.118072e+09
## `Surface Condition`Ice/Frost                                             3.236784e+02
## `Surface Condition`Mud, Dirt, Gravel                                     9.520125e+03
## `Surface Condition`MUD, DIRT, GRAVEL                                     3.123081e+09
## `Surface Condition`N/A                                                   3.133444e+09
## `Surface Condition`Oil                                                   6.909153e+03
## `Surface Condition`OIL                                                   2.272935e+09
## `Surface Condition`Other                                                 2.477212e+03
## `Surface Condition`OTHER                                                 3.211321e+09
## `Surface Condition`Sand                                                  7.301886e+03
## `Surface Condition`SAND                                                  3.064824e+09
## `Surface Condition`Slush                                                 7.613207e+02
## `Surface Condition`SLUSH                                                 3.297731e+09
## `Surface Condition`Snow                                                  3.690696e+02
## `Surface Condition`SNOW                                                  3.097208e+09
## `Surface Condition`UNKNOWN                                               3.265964e+09
## `Surface Condition`Water (standing, moving)                              1.946468e+03
## `Surface Condition`WATER(STANDING/MOVING)                                3.185526e+09
## `Surface Condition`Wet                                                  -4.254689e-01
## `Surface Condition`WET                                                   3.148293e+09
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                        7.871782e+02
## `Driver Distracted By`BY OTHER OCCUPANTS                                 5.456133e+02
## `Driver Distracted By`DIALING CELLULAR PHONE                             5.630311e+02
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT       4.891514e+02
## `Driver Distracted By`EATING OR DRINKING                                 7.442952e+02
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                     6.347405e+02
## `Driver Distracted By`LOOKED BUT DID NOT SEE                             5.741775e+02
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)   9.594237e+02
## `Driver Distracted By`NO DRIVER PRESENT                                  6.179759e+02
## `Driver Distracted By`Not Distracted                                    -2.348691e+00
## `Driver Distracted By`NOT DISTRACTED                                     6.472009e+02
## `Driver Distracted By`Other Action (looking away from task, etc.)       -1.318496e+03
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                       6.545889e+02
## `Driver Distracted By`OTHER DISTRACTION                                  6.524905e+02
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)  7.275517e+02
## `Driver Distracted By`SMOKING RELATED                                    1.494273e+03
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE             5.405335e+02
## `Driver Distracted By`Talking/listening                                  2.076328e+00
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                      6.762388e+02
## `Driver Distracted By`Unknown                                                      NA
## `Driver Distracted By`UNKNOWN                                            5.292429e+02
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE           1.114239e+03
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE    7.312269e+02
# Odds ratios
exp(coef(model))
##                                                             (Intercept) 
##                                                            0.000000e+00 
##                                                     WeatherBlowing Snow 
##                                                                     Inf 
##                                                     WeatherBLOWING SNOW 
##                                                            7.181693e-01 
##                                                            WeatherClear 
##                                                                     Inf 
##                                                            WeatherCLEAR 
##                                                            7.788317e-01 
##                                                           WeatherCloudy 
##                                                                     Inf 
##                                                           WeatherCLOUDY 
##                                                            7.671976e-01 
##                                                 WeatherFog, Smog, Smoke 
##                                                                     Inf 
##                                                            WeatherFOGGY 
##                                                            7.133961e-01 
##                                WeatherFreezing Rain Or Freezing Drizzle 
##                                                                     Inf 
##                                                              WeatherN/A 
##                                                            7.720265e-01 
##                                                            WeatherOTHER 
##                                                            8.408584e-01 
##                                                             WeatherRain 
##                                                                     Inf 
##                                                          WeatherRAINING 
##                                                            9.371918e-01 
##                                                WeatherSevere Crosswinds 
##                                                                     Inf 
##                                                     WeatherSEVERE WINDS 
##                                                            9.075994e-01 
##                                                            WeatherSLEET 
##                                                            9.644972e-01 
##                                                    WeatherSleet Or Hail 
##                                                                     Inf 
##                                                             WeatherSnow 
##                                                                     Inf 
##                                                             WeatherSNOW 
##                                                            9.619112e-01 
##                                                          WeatherUnknown 
##                                                                     Inf 
##                                                          WeatherUNKNOWN 
##                                                            1.017856e+00 
##                                                       WeatherWINTRY MIX 
##                                                            1.068130e+00 
##                                                  `Surface Condition`DRY 
##                                                                     Inf 
##                                                  `Surface Condition`ICE 
##                                                                     Inf 
##                                            `Surface Condition`Ice/Frost 
##                                                            5.512148e-09 
##                                    `Surface Condition`Mud, Dirt, Gravel 
##                                                            7.573459e-09 
##                                    `Surface Condition`MUD, DIRT, GRAVEL 
##                                                                     Inf 
##                                                  `Surface Condition`N/A 
##                                                                     Inf 
##                                                  `Surface Condition`Oil 
##                                                            7.621544e-09 
##                                                  `Surface Condition`OIL 
##                                                                     Inf 
##                                                `Surface Condition`Other 
##                                                            3.156796e-09 
##                                                `Surface Condition`OTHER 
##                                                                     Inf 
##                                                 `Surface Condition`Sand 
##                                                            2.044881e-09 
##                                                 `Surface Condition`SAND 
##                                                                     Inf 
##                                                `Surface Condition`Slush 
##                                                            6.323433e-09 
##                                                `Surface Condition`SLUSH 
##                                                                     Inf 
##                                                 `Surface Condition`Snow 
##                                                            2.235539e-08 
##                                                 `Surface Condition`SNOW 
##                                                                     Inf 
##                                              `Surface Condition`UNKNOWN 
##                                                                     Inf 
##                             `Surface Condition`Water (standing, moving) 
##                                                            4.588086e-09 
##                               `Surface Condition`WATER(STANDING/MOVING) 
##                                                                     Inf 
##                                                  `Surface Condition`Wet 
##                                                            6.220771e-01 
##                                                  `Surface Condition`WET 
##                                                                     Inf 
##                       `Driver Distracted By`BY MOVING OBJECT IN VEHICLE 
##                                                            9.999994e-01 
##                                `Driver Distracted By`BY OTHER OCCUPANTS 
##                                                            9.999998e-01 
##                            `Driver Distracted By`DIALING CELLULAR PHONE 
##                                                            1.000009e+00 
##      `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT 
##                                                            1.000010e+00 
##                                `Driver Distracted By`EATING OR DRINKING 
##                                                            9.999902e-01 
##                    `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT 
##                                                            1.000008e+00 
##                            `Driver Distracted By`LOOKED BUT DID NOT SEE 
##                                                            9.999945e-01 
##  `Driver Distracted By`Manually Operating (dialing, playing game, etc.) 
##                                                            8.396168e-10 
##                                 `Driver Distracted By`NO DRIVER PRESENT 
##                                                            1.000002e+00 
##                                    `Driver Distracted By`Not Distracted 
##                                                            9.379103e-02 
##                                    `Driver Distracted By`NOT DISTRACTED 
##                                                            1.000009e+00 
##       `Driver Distracted By`Other Action (looking away from task, etc.) 
##                                                            1.235436e-09 
##                      `Driver Distracted By`OTHER CELLULAR PHONE RELATED 
##                                                            1.000011e+00 
##                                 `Driver Distracted By`OTHER DISTRACTION 
##                                                            9.999958e-01 
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT) 
##                                                            1.000010e+00 
##                                   `Driver Distracted By`SMOKING RELATED 
##                                                            9.999996e-01 
##            `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE 
##                                                            1.000005e+00 
##                                 `Driver Distracted By`Talking/listening 
##                                                            7.708872e+00 
##                     `Driver Distracted By`TEXTING FROM A CELLULAR PHONE 
##                                                            1.000005e+00 
##                                           `Driver Distracted By`Unknown 
##                                                                      NA 
##                                           `Driver Distracted By`UNKNOWN 
##                                                            1.000001e+00 
##          `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE 
##                                                            1.000005e+00 
##   `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE 
##                                                            1.000000e+00
exp(confint(model))
## Waiting for profiling to be done...
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
##                                                                                 2.5 %
## (Intercept)                                                              0.000000e+00
## WeatherBlowing Snow                                                      0.000000e+00
## WeatherBLOWING SNOW                                                      0.000000e+00
## WeatherClear                                                             0.000000e+00
## WeatherCLEAR                                                             0.000000e+00
## WeatherCloudy                                                            0.000000e+00
## WeatherCLOUDY                                                           8.621830e-312
## WeatherFog, Smog, Smoke                                                  0.000000e+00
## WeatherFOGGY                                                             0.000000e+00
## WeatherFreezing Rain Or Freezing Drizzle                                 0.000000e+00
## WeatherN/A                                                               0.000000e+00
## WeatherOTHER                                                             0.000000e+00
## WeatherRain                                                              0.000000e+00
## WeatherRAINING                                                           0.000000e+00
## WeatherSevere Crosswinds                                                 0.000000e+00
## WeatherSEVERE WINDS                                                      0.000000e+00
## WeatherSLEET                                                             0.000000e+00
## WeatherSleet Or Hail                                                     0.000000e+00
## WeatherSnow                                                              0.000000e+00
## WeatherSNOW                                                              0.000000e+00
## WeatherUnknown                                                           0.000000e+00
## WeatherUNKNOWN                                                           0.000000e+00
## WeatherWINTRY MIX                                                        0.000000e+00
## `Surface Condition`DRY                                                   0.000000e+00
## `Surface Condition`ICE                                                   0.000000e+00
## `Surface Condition`Ice/Frost                                            7.362549e-128
## `Surface Condition`Mud, Dirt, Gravel                                               NA
## `Surface Condition`MUD, DIRT, GRAVEL                                     0.000000e+00
## `Surface Condition`N/A                                                   0.000000e+00
## `Surface Condition`Oil                                                   0.000000e+00
## `Surface Condition`OIL                                                   0.000000e+00
## `Surface Condition`Other                                                 0.000000e+00
## `Surface Condition`OTHER                                                 0.000000e+00
## `Surface Condition`Sand                                                  0.000000e+00
## `Surface Condition`SAND                                                  0.000000e+00
## `Surface Condition`Slush                                                 0.000000e+00
## `Surface Condition`SLUSH                                                 0.000000e+00
## `Surface Condition`Snow                                                 3.000127e-181
## `Surface Condition`SNOW                                                  0.000000e+00
## `Surface Condition`UNKNOWN                                               0.000000e+00
## `Surface Condition`Water (standing, moving)                              0.000000e+00
## `Surface Condition`WATER(STANDING/MOVING)                                0.000000e+00
## `Surface Condition`Wet                                                   3.351006e-02
## `Surface Condition`WET                                                   0.000000e+00
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                        0.000000e+00
## `Driver Distracted By`BY OTHER OCCUPANTS                                4.364932e-268
## `Driver Distracted By`DIALING CELLULAR PHONE                            1.682839e-204
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT      1.178724e-185
## `Driver Distracted By`EATING OR DRINKING                                4.975380e-297
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                    3.270882e-282
## `Driver Distracted By`LOOKED BUT DID NOT SEE                            1.679100e-243
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)   0.000000e+00
## `Driver Distracted By`NO DRIVER PRESENT                                 1.527341e-301
## `Driver Distracted By`Not Distracted                                     8.170703e-02
## `Driver Distracted By`NOT DISTRACTED                                    8.399242e-282
## `Driver Distracted By`Other Action (looking away from task, etc.)        0.000000e+00
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                      5.998063e-286
## `Driver Distracted By`OTHER DISTRACTION                                 1.051993e-281
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)  0.000000e+00
## `Driver Distracted By`SMOKING RELATED                                    0.000000e+00
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE            2.044313e-196
## `Driver Distracted By`Talking/listening                                  1.227943e+00
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                     1.689990e-239
## `Driver Distracted By`Unknown                                                      NA
## `Driver Distracted By`UNKNOWN                                           2.357201e-250
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE           0.000000e+00
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE   3.296151e-277
##                                                                                97.5 %
## (Intercept)                                                              0.000000e+00
## WeatherBlowing Snow                                                               Inf
## WeatherBLOWING SNOW                                                               Inf
## WeatherClear                                                                      Inf
## WeatherCLEAR                                                                      Inf
## WeatherCloudy                                                                     Inf
## WeatherCLOUDY                                                           7.885208e+250
## WeatherFog, Smog, Smoke                                                           Inf
## WeatherFOGGY                                                                      Inf
## WeatherFreezing Rain Or Freezing Drizzle                                          Inf
## WeatherN/A                                                                        Inf
## WeatherOTHER                                                                      Inf
## WeatherRain                                                                       Inf
## WeatherRAINING                                                                    Inf
## WeatherSevere Crosswinds                                                          Inf
## WeatherSEVERE WINDS                                                               Inf
## WeatherSLEET                                                                      Inf
## WeatherSleet Or Hail                                                              Inf
## WeatherSnow                                                                       Inf
## WeatherSNOW                                                                       Inf
## WeatherUnknown                                                                    Inf
## WeatherUNKNOWN                                                                    Inf
## WeatherWINTRY MIX                                                                 Inf
## `Surface Condition`DRY                                                            Inf
## `Surface Condition`ICE                                                            Inf
## `Surface Condition`Ice/Frost                                            3.730420e+140
## `Surface Condition`Mud, Dirt, Gravel                                              Inf
## `Surface Condition`MUD, DIRT, GRAVEL                                              Inf
## `Surface Condition`N/A                                                            Inf
## `Surface Condition`Oil                                                            Inf
## `Surface Condition`OIL                                                            Inf
## `Surface Condition`Other                                                          Inf
## `Surface Condition`OTHER                                                          Inf
## `Surface Condition`Sand                                                           Inf
## `Surface Condition`SAND                                                           Inf
## `Surface Condition`Slush                                                          Inf
## `Surface Condition`SLUSH                                                          Inf
## `Surface Condition`Snow                                                 1.927035e+160
## `Surface Condition`SNOW                                                           Inf
## `Surface Condition`UNKNOWN                                                        Inf
## `Surface Condition`Water (standing, moving)                                       Inf
## `Surface Condition`WATER(STANDING/MOVING)                                         Inf
## `Surface Condition`Wet                                                   6.534633e-01
## `Surface Condition`WET                                                            Inf
## `Driver Distracted By`BY MOVING OBJECT IN VEHICLE                                 Inf
## `Driver Distracted By`BY OTHER OCCUPANTS                                9.053796e+236
## `Driver Distracted By`DIALING CELLULAR PHONE                            3.321307e+244
## `Driver Distracted By`DISTRACTED BY OUTSIDE PERSON OBJECT OR EVENT      2.727352e+212
## `Driver Distracted By`EATING OR DRINKING                                          Inf
## `Driver Distracted By`INATTENTIVE OR LOST IN THOUGHT                    4.616402e+275
## `Driver Distracted By`LOOKED BUT DID NOT SEE                            2.302120e+249
## `Driver Distracted By`Manually Operating (dialing, playing game, etc.)            Inf
## `Driver Distracted By`NO DRIVER PRESENT                                 2.418457e+268
## `Driver Distracted By`Not Distracted                                     9.549407e-02
## `Driver Distracted By`NOT DISTRACTED                                    1.190605e+281
## `Driver Distracted By`Other Action (looking away from task, etc.)        0.000000e+00
## `Driver Distracted By`OTHER CELLULAR PHONE RELATED                      1.924628e+284
## `Driver Distracted By`OTHER DISTRACTION                                 2.360632e+283
## `Driver Distracted By`OTHER ELECTRONIC DEVICE (NAVIGATIONAL PALM PILOT)           Inf
## `Driver Distracted By`SMOKING RELATED                                             Inf
## `Driver Distracted By`TALKING OR LISTENING TO CELLULAR PHONE            5.632831e+234
## `Driver Distracted By`Talking/listening                                  7.975130e+00
## `Driver Distracted By`TEXTING FROM A CELLULAR PHONE                     4.861839e+293
## `Driver Distracted By`Unknown                                                      NA
## `Driver Distracted By`UNKNOWN                                           7.035178e+229
## `Driver Distracted By`USING DEVICE OBJECT BROUGHT INTO VEHICLE                    Inf
## `Driver Distracted By`USING OTHER DEVICE CONTROLS INTEGRAL TO VEHICLE             Inf

#Logistic Regression Model Interpretation The logistic regression model shows that the predictors significantly improve the fit compared to the null model (residual deviance = 471.26 vs. null deviance = 652.96, AIC = 603.26). Significant variables, such as weather conditions, driver distraction, and surface conditions, increase the likelihood of incidents. The barplots support this by showing higher counts in these categories. Together, the analysis suggests that both environmental and human factors play a key role in predicting incidents.

#Model Diagnostics (Confusion Matrix)

#Predictions

crash_clean$pred_prob <- predict(model, type = "response")

#Classify using 0.5 threshold

pred_class <- factor(ifelse(crash_clean$pred_prob >= 0.5, 1, 0), levels = c(0,1))
actual_class <- factor(crash_clean$injury_bin, levels = c(0,1))

# Create confusion matrix table
table(pred_class, actual_class)
##           actual_class
## pred_class      0      1
##          0 185092     34
##          1      0      0

#Interpretation of the Confusion Matrix

The confusion matrix shows that the model predicts almost all cases as non-injury (0). There are 185,092 true negatives, meaning non-injury cases were correctly classified. There are 34 false negatives, meaning injury cases were incorrectly predicted as non-injury. The model did not predict any cases as injury, resulting in zero true positives and zero false positives. This indicates that the model has very high specificity but zero sensitivity, meaning it completely fails to identify injured cases. The model is biased toward the majority class because the data are highly imbalanced, with very few injury or fatal cases compared to non-injury cases. Therefore, The logistic regression model performs poorly at detecting injury cases because it predicts only the majority class. Although overall accuracy appears high, the model has no practical value for identifying injured drivers in its current form.

#ROC curve and AUC

# Install pROC if not already installed
if(!require(pROC)) install.packages("pROC")
## Loading required package: pROC
## Warning: package 'pROC' was built under R version 4.5.2
## Type 'citation("pROC")' for a citation.
## 
## Attaching package: 'pROC'
## The following objects are masked from 'package:stats':
## 
##     cov, smooth, var
# Load the package
library(pROC)
#ROC curve and AUC

roc_obj <- roc(actual_class, crash_clean$pred_prob)
## Setting levels: control = 0, case = 1
## Setting direction: controls < cases
plot(roc_obj, main = "ROC Curve for Injury Prediction Model")

auc(roc_obj)
## Area under the curve: 0.9702

#Interpretation of the ROC Curve

The ROC curve shows the relationship between sensitivity (true positive rate) and specificity (true negative rate) for the injury prediction model. The curve rises steeply toward the top left area of the graph, which indicates that the model has some ability to distinguish between injury and non-injury cases. However, the curve stays close to the vertical and upper edges because the dataset is highly imbalanced, with far more non-injury cases than injury cases. This shape suggests that the model performs better at identifying non-injury cases than injury cases. Overall, the model shows limited practical value for real-world injury prediction because it struggles to correctly classify rare injury events despite appearing strong visually.

#Key findings The model showed high overall accuracy, but this was driven mainly by the large number of non-injury cases. Sensitivity was very low, meaning the model failed to correctly identify most injury cases. Specificity was very high, indicating the model accurately classified non-injury cases. The predictors (weather, surface condition, and driver distraction) showed weak predictive strength when used alone. Rare injury cases led to poor model convergence and unstable probability estimates.

#Conclusion

The logistic regression results suggest that while environmental and behavioral factors contribute to crash outcomes, they are not sufficient by themselves to reliably predict driver injury. Additional variables and improved modeling techniques would be required to increase predictive performance.

#Future Directions

Future research should address the strong class imbalance by collecting more injury cases or using techniques such as oversampling, undersampling, or synthetic data generation. Incorporating additional predictors, such as driver demographics, vehicle type, speed, and traffic conditions, could improve the model’s predictive power. Advanced modeling approaches, including ensemble methods or machine learning algorithms, may better capture complex interactions between factors. Finally, combining statistical analysis with visual tools like barplots can enhance understanding of high-risk scenarios and guide targeted interventions for driver safety.

#References Crash Reporting - Drivers Data https://catalog.data.gov/dataset/crash-reporting-drivers-data