Project Overview

Based on data from the National Transportation Safety Board (NTSB) repository, this project provides a structured and data-driven investigation of aviation accidents across the United States.
The goal is to derive valuable insights into the characteristics, causes, and consequences of these incidents.

Load the required libraries

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## βœ” dplyr     1.1.4     βœ” readr     2.1.5
## βœ” forcats   1.0.0     βœ” stringr   1.5.1
## βœ” ggplot2   3.5.1     βœ” tibble    3.2.1
## βœ” lubridate 1.9.4     βœ” tidyr     1.3.1
## βœ” purrr     1.0.4     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## βœ– dplyr::filter() masks stats::filter()
## βœ– dplyr::lag()    masks stats::lag()
## β„Ή Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)

β€”β€”β€”β€”β€”β€”- Data Preprocessing β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

# Load the datasets
crash_data <- read_csv("C:/PaNDa/not possible/CAP_482/Project_DataSets/aviation.csv")
## Rows: 44507 Columns: 36
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (26): NtsbNo, EventType, City, State, Country, ReportNo, N, ReportType,...
## dbl   (6): Mkey, FatalInjuryCount, SeriousInjuryCount, MinorInjuryCount, Lat...
## lgl   (2): HasSafetyRec, RepGenFlag
## dttm  (2): EventDate, OriginalPublishDate
## 
## β„Ή 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.
View(crash_data)
# Missing values 
colSums(is.na(crash_data))
##              NtsbNo           EventType                Mkey           EventDate 
##                   0                   0                   0                   0 
##                City               State             Country            ReportNo 
##                  28                6536                  43               44413 
##                   N        HasSafetyRec          ReportType OriginalPublishDate 
##                  87                   0                   0                6176 
##  HighestInjuryLevel    FatalInjuryCount  SeriousInjuryCount    MinorInjuryCount 
##                 746                   0                   0                   0 
##       ProbableCause            Latitude           Longitude                Make 
##                7131                   0                   0                  52 
##               Model    AirCraftCategory           AirportID         AirportName 
##                  65                 441               17243               17149 
##        AmateurBuilt     NumberOfEngines           Scheduled     PurposeOfFlight 
##                   0                5275               39231                6801 
##                 FAR      AirCraftDamage    WeatherCondition            Operator 
##                 644                 338                5130               24135 
##        ReportStatus          RepGenFlag           DocketUrl   DocketPublishDate 
##                   0                   0               21116               21116
# Remove columns with more than 50% missing values
crash_data <- crash_data %>%
  select(-c(DocketUrl, DocketPublishDate))
View(crash_data)
# Fill Missing Numeric Values with Mean/Median
crash_data <- crash_data %>%
  mutate(across(where(is.numeric), ~ ifelse(is.na(.), mean(., na.rm = TRUE), .)))
View(crash_data)
# Fill Missing Categorical Values with Mode
crash_data <- crash_data %>%
  mutate(across(where(is.character), ~ ifelse(is.na(.), names(sort(table(.), decreasing = TRUE))[1], .)))
View(crash_data)
# Convert categorical variables to factors
crash_data <- crash_data %>%
  mutate(across(where(is.character), as.factor))
str(crash_data)
## tibble [44,507 Γ— 34] (S3: tbl_df/tbl/data.frame)
##  $ NtsbNo             : Factor w/ 44507 levels "ANC00FA024","ANC00FA052",..: 25234 2575 44506 11169 25169 15984 16017 16018 11168 11166 ...
##  $ EventType          : Factor w/ 3 levels "ACC","INC","OCC": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Mkey               : num [1:44507] 199500 199498 199524 199496 199492 ...
##  $ EventDate          : POSIXct[1:44507], format: "2025-01-01 02:20:00" "2024-12-31 14:30:00" ...
##  $ City               : Factor w/ 13793 levels "40 nm vicinity south of Lake Jackson",..: 8366 307 7010 4333 9397 4842 8222 9088 8017 9317 ...
##  $ State              : Factor w/ 57 levels "Alabama","Alaska",..: 12 2 35 50 39 6 6 6 19 20 ...
##  $ Country            : Factor w/ 190 levels "Afghanistan",..: 179 179 179 179 179 179 141 128 179 179 ...
##  $ ReportNo           : Factor w/ 94 levels "AAB0202","AAB0203",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ N                  : Factor w/ 42077 levels "(H-VISTA",",",..: 33019 14854 28743 18403 28076 26450 2592 39899 19803 29142 ...
##  $ HasSafetyRec       : logi [1:44507] FALSE FALSE FALSE FALSE FALSE FALSE ...
##  $ ReportType         : Factor w/ 4 levels "BoardBrief","DirectorBrief",..: 2 2 2 2 2 2 3 2 2 2 ...
##  $ OriginalPublishDate: POSIXct[1:44507], format: NA NA ...
##  $ HighestInjuryLevel : Factor w/ 4 levels "Fatal","Minor",..: 3 3 3 3 1 4 1 3 3 4 ...
##  $ FatalInjuryCount   : num [1:44507] 0 0 0 0 1 0 173 0 0 0 ...
##  $ SeriousInjuryCount : num [1:44507] 0 0 0 0 0 1 2 0 0 1 ...
##  $ MinorInjuryCount   : num [1:44507] 0 0 0 0 0 0 0 0 0 0 ...
##  $ ProbableCause      : Factor w/ 34533 levels "'THIS CASE WAS MODIFIED MAY 30, 2006.'The airplane's inadvertent impact with one of several deer that had enter"| __truncated__,..: 1443 1443 1443 29635 1443 1443 1443 1443 1443 1443 ...
##  $ Latitude           : num [1:44507] 26.2 61.2 35.9 29.3 39 ...
##  $ Longitude          : num [1:44507] -81.8 -149.8 -106.3 -94.8 -83.4 ...
##  $ Make               : Factor w/ 6463 levels ",","107.5 Flying Corporation",..: 652 1227 1227 4963 1227 812 812 812 1826 1553 ...
##  $ Model              : Factor w/ 8860 levels "-","-269C","(EX) RV-6",..: 1739 260 365 6730 664 1354 1093 1093 3405 3340 ...
##  $ AirCraftCategory   : Factor w/ 38 levels ",",",AIR,AIR",..: 3 3 3 21 3 3 3 3 3 3 ...
##  $ AirportID          : Factor w/ 7691 levels "-","---","(AZ38)",..: 2154 2132 4953 5780 5781 5781 5781 5781 5622 5781 ...
##  $ AirportName        : Factor w/ 14914 levels "---","-70.8301542",..: 9243 8574 10775 10815 10775 10775 10775 10775 10775 10775 ...
##  $ AmateurBuilt       : Factor w/ 7 levels "FALSE","FALSE,FALSE",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ NumberOfEngines    : Factor w/ 34 levels ",",",,",",0",..: 11 11 11 11 18 11 11 11 11 11 ...
##  $ Scheduled          : Factor w/ 3 levels "NSCH","SCHD",..: 1 1 1 1 1 2 2 1 1 1 ...
##  $ PurposeOfFlight    : Factor w/ 99 levels ",",",,",",AOBV",..: 61 48 61 75 37 61 61 61 61 61 ...
##  $ FAR                : Factor w/ 69 levels ",","091,ARMF",..: 39 39 39 39 39 26 48 39 39 39 ...
##  $ AirCraftDamage     : Factor w/ 28 levels ",","Destroyed",..: 19 19 19 19 19 19 19 19 19 19 ...
##  $ WeatherCondition   : Factor w/ 3 levels "IMC","Unknown",..: 1 3 3 3 3 3 3 3 3 3 ...
##  $ Operator           : Factor w/ 16956 levels "--","– M/s Jindal Steel & Power Ltd.",..: 11965 11965 11965 6228 11965 15729 8175 9086 9736 11965 ...
##  $ ReportStatus       : Factor w/ 3 levels "Completed","In work",..: 2 2 2 1 2 2 3 3 2 2 ...
##  $ RepGenFlag         : logi [1:44507] FALSE FALSE FALSE FALSE FALSE FALSE ...
# Convert Manufacturer in uppercase 
crash_data <- crash_data %>%
  mutate(Make = toupper(Make))
# Replace empty/blank category "," with "UNKNOWN" in AirCraftCategory
crash_data <- crash_data %>%
  mutate(AirCraftCategory = ifelse(AirCraftCategory == " , ", "UNKNOWN", AirCraftCategory))
# Save the cleaned datasets
write_csv(crash_data, "C:/PaNDa/not possible/CAP_482/Project_DataSets/aviation_cleaned.csv")

β€”β€”β€”β€”β€”β€”- Exploratory Data Analysis β€”β€”β€”β€”β€”β€”

Q1. What is the average number of fatalities per incident by aircraft category

avg_fatalities_by_category <- crash_data %>%
  group_by(AirCraftCategory) %>%
  summarise(AvgFatalities = mean(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(AvgFatalities))
View(avg_fatalities_by_category)

Interpretation

Q2. What percentage of incidents have an official report published?

report_percentage <- crash_data %>%
  summarise(ReportPublished = sum(!is.na(ReportStatus)) / n() * 100)
cat("Percentage of incidents with an official report published: ", report_percentage$ReportPublished, "%\n")
## Percentage of incidents with an official report published:  100 %

Interpretation

Q3. What are the most common causes of aviation accidents?

commonn_causes <- crash_data %>%
  group_by(ProbableCause) %>%
  summarise(Count = n()) %>%
  arrange(desc(Count)) %>%
  top_n(10, Count)
View(commonn_causes)

Interpretation

β€”β€”β€”β€”β€”β€”- Data Extraction and Filtering β€”β€”β€”β€”β€”β€”

Q4. Which years had the highest aviation accident rates?

accident_rates_by_year <- crash_data %>%
  mutate(Year = as.numeric(substr(EventDate, 1, 4))) %>%
  count(Year) %>%
  arrange(desc(n))
View(accident_rates_by_year)

Interpretation

Q5. What is the survival rate of aviation incidents?

survival_rate <- crash_data %>%
  mutate(Survival = (1 - (FatalInjuryCount / (FatalInjuryCount + SeriousInjuryCount + MinorInjuryCount ))) * 100)
cat("Survival rate of aviation incidents: ", mean(survival_rate$Survival, na.rm = TRUE), "%\n")
## Survival rate of aviation incidents:  58.05775 %

Interpretation

Q6. Do weather conditions (VMC vs IMC) contribute to more accidents?

weather_accidents <- crash_data %>%
  group_by(WeatherCondition) %>%
  summarise(Count = n()) %>%
  arrange(desc(Count))
cat("Accidents in VMC: ", weather_accidents$Count[weather_accidents$WeatherCondition == "VMC"], "\n")
## Accidents in VMC:  41905
cat("Accidents in IMC: ", weather_accidents$Count[weather_accidents$WeatherCondition == "IMC"], "\n")
## Accidents in IMC:  2254
cat("Accidents in Unknown: ", weather_accidents$Count[weather_accidents$WeatherCondition == "Unknown"], "\n")
## Accidents in Unknown:  348

Interpretation

Q7. How many incidents involve multi-engine aircraft?

multi_engine_incidents <- crash_data %>%
  count(NumberOfEngines) %>%
  summarise(TotalIncidents = sum(n))
cat("Total incidents involving multi-engine aircraft: ", multi_engine_incidents$TotalIncidents, "\n")
## Total incidents involving multi-engine aircraft:  44507

Interpretation

β€”β€”β€”β€”β€”β€”- Grouping and Summarization β€”β€”β€”β€”β€”β€”

Q8. Which manufacturer has the highest number of fatal incidents per 100 aircraft registered?

fatal_incidents_per_manufacturer <- crash_data %>%
  group_by(Make) %>%
  summarise(Fatal_Incidents = sum(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(Fatal_Incidents)) %>%
  head(10)
cat("Top 10 manufacturers with the highest number of fatal incidents:\n")
## Top 10 manufacturers with the highest number of fatal incidents:
print(fatal_incidents_per_manufacturer)
## # A tibble: 10 Γ— 2
##    Make              Fatal_Incidents
##    <chr>                       <dbl>
##  1 BOEING                       4950
##  2 CESSNA                       4253
##  3 PIPER                        2759
##  4 BEECH                        1802
##  5 AIRBUS                       1330
##  6 AIRBUS INDUSTRIE             1088
##  7 BELL                          738
##  8 ROBINSON                      548
##  9 MOONEY                        285
## 10 MCDONNELL DOUGLAS             264

Interpretation

Q9. Which type of flight purpose has the highest accident rate per 1000 flights?

accident_rate_by_purpose <- crash_data %>%
  group_by(PurposeOfFlight) %>%
  summarise(Total_Incidents = n()) %>%
  arrange(desc(Total_Incidents))
cat("Accident rate by purpose of flight:\n")
## Accident rate by purpose of flight:
print(accident_rate_by_purpose)
## # A tibble: 99 Γ— 2
##    PurposeOfFlight Total_Incidents
##    <fct>                     <int>
##  1 PERS                      30667
##  2 INST                       5176
##  3 AAPL                       1869
##  4 BUS                        1159
##  5 POSI                        955
##  6 UNK                         821
##  7 OWRK                        680
##  8 FLTS                        462
##  9 AOBV                        459
## 10 PUBU                        238
## # β„Ή 89 more rows

Interpretation

Q10. Which type of aircraft is most frequently involved in fatal incidents?

fatal_incidents_by_aircraft <- crash_data %>%
  group_by(AirCraftCategory) %>%
  summarise(Fatal_Incidents = sum(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(Fatal_Incidents))
cat("Top aircraft categories involved in fatal incidents:\n")
## Top aircraft categories involved in fatal incidents:
print(fatal_incidents_by_aircraft)
## # A tibble: 38 Γ— 2
##    AirCraftCategory Fatal_Incidents
##               <int>           <dbl>
##  1                3           23613
##  2               21            2315
##  3                5             502
##  4                1             191
##  5               17             134
##  6               38              84
##  7               20              80
##  8               12              55
##  9                9              42
## 10               23              24
## # β„Ή 28 more rows

Interpretation

β€”β€”β€”β€”β€”β€”- Sorting and Ranking β€”β€”β€”β€”β€”β€”

Q11. Which state has the highest number of aviation accidents per million people?

accidents_per_state <- crash_data %>%
  group_by(State) %>%
  summarise(Total_Incidents = sum(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(Total_Incidents)) %>%
  head(10)
cat("Top 10 states with the highest number of aviation accidents:\n")
## Top 10 states with the highest number of aviation accidents:
print(accidents_per_state)
## # A tibble: 10 Γ— 2
##    State          Total_Incidents
##    <fct>                    <dbl>
##  1 California               16400
##  2 Florida                    860
##  3 Texas                      836
##  4 New York                   713
##  5 Alaska                     507
##  6 Arizona                    443
##  7 Colorado                   418
##  8 Georgia                    388
##  9 North Carolina             296
## 10 Utah                       272

Interpretation

Q12. Rank the top 5 airline with the least accidents

least_accidents <- crash_data %>%
  group_by(Make) %>%
  summarise(Total_Incidents = n()) %>%
  arrange(Total_Incidents) %>%
  head(5)
cat("Top 5 airlines with the least accidents:\n")
## Top 5 airlines with the least accidents:
print(least_accidents)
## # A tibble: 5 Γ— 2
##   Make                     Total_Incidents
##   <chr>                              <int>
## 1 ,                                      1
## 2 107.5 FLYING CORPORATION               1
## 3 1200                                   1
## 4 177MF LLC                              1
## 5 1977 COLFER-CHAN                       1

Interpretation

Q13. Which five years had the deadliest aviation accidents?

deadliest_years <- crash_data %>%
  mutate(Year = as.numeric(substr(EventDate, 1, 4))) %>%
  group_by(Year) %>%
  summarise(Total_Fatalities = sum(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(Total_Fatalities)) %>%
  head(5)
cat("Top 5 deadliest years for aviation accidents:\n")
## Top 5 deadliest years for aviation accidents:
print(deadliest_years)
## # A tibble: 5 Γ— 2
##    Year Total_Fatalities
##   <dbl>            <dbl>
## 1  2000             1716
## 2  2005             1674
## 3  2001             1564
## 4  2010             1374
## 5  2003             1347
View(crash_data)

Interpretation

β€”β€”β€”β€”β€”β€”- Feature Engineering β€”β€”β€”β€”β€”β€”

Q14. Create a new column for β€œIncidentSeverity” based on the number of fatalities

crash_data <- crash_data %>%
  mutate(IncidentSeverity = case_when(
    FatalInjuryCount > 0 ~ "Catastrophic",
    SeriousInjuryCount > 0 ~ "Serious",
    MinorInjuryCount > 0 ~ "Minor",
    TRUE ~ "No Injury"
  ))
View(crash_data)

Interpretation

Q15. Generate a new feature β€˜FatalityRate’ as the ratio of fatalities to total injuries

crash_data <- crash_data %>%
  mutate(FatalityRate = (FatalInjuryCount / (FatalInjuryCount + SeriousInjuryCount + MinorInjuryCount)) * 100)
View(crash_data)

Interpretation:

β€”β€”β€”β€”β€”β€”- Hypothesis Testing and Advanced Insights β€”β€”β€”β€”β€”β€”

Q16. Does the time of year affect the number of aviation accidents?

crash_data$EventMonth <- as.numeric(format(as.Date(crash_data$EventDate, format="%Y-%m-%d"), "%m"))
accidents_by_month <- crash_data %>%
  group_by(EventMonth) %>%
  summarise(Total_Incidents = n()) %>%
  arrange(EventMonth)
cat("Accidents by month:\n")
## Accidents by month:
print(accidents_by_month)
## # A tibble: 12 Γ— 2
##    EventMonth Total_Incidents
##         <dbl>           <int>
##  1          1            2519
##  2          2            2638
##  3          3            3290
##  4          4            3536
##  5          5            4221
##  6          6            4861
##  7          7            5384
##  8          8            4890
##  9          9            4189
## 10         10            3616
## 11         11            2779
## 12         12            2584

Interpretation:

Q17. Are amateur-built aircraft more dangerous than factory-built aircraft?

# Step 1: Keep only rows with valid TRUE/FALSE values

crash_data$AmateurBuilt <- ifelse(crash_data$AmateurBuilt == "TRUE", TRUE,
                                ifelse(crash_data$AmateurBuilt == "FALSE", FALSE, NA))

aviation_clean <- crash_data %>%
  filter(!is.na(AmateurBuilt))
t.test(FatalInjuryCount ~ AmateurBuilt, data = crash_data)
## 
##  Welch Two Sample t-test
## 
## data:  FatalInjuryCount by AmateurBuilt
## t = 10.462, df = 43580, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group FALSE and group TRUE is not equal to 0
## 95 percent confidence interval:
##  0.2513898 0.3672959
## sample estimates:
## mean in group FALSE  mean in group TRUE 
##           0.6364457           0.3271028

Interpretation:

Q18. Is there a significant difference in fatal injuries between incidents that occurred in the Northern Hemisphere vs.Β the Southern Hemisphere?

# Step 1: Classify hemisphere
aviation_geo <- crash_data %>%
  filter(!is.na(Latitude), !is.na(FatalInjuryCount)) %>%
  mutate(Hemisphere = ifelse(Latitude >= 0, "Northern", "Southern"))
# Step 2: Perform t-test
t.test(FatalInjuryCount ~ Hemisphere, data = aviation_geo)
## 
##  Welch Two Sample t-test
## 
## data:  FatalInjuryCount by Hemisphere
## t = -6.1537, df = 899.67, p-value = 1.139e-09
## alternative hypothesis: true difference in means between group Northern and group Southern is not equal to 0
## 95 percent confidence interval:
##  -1.6733180 -0.8640648
## sample estimates:
## mean in group Northern mean in group Southern 
##              0.5848555              1.8535469

Interpretation:

Q19. Do incidents at airports have a higher fatality rate than those that occur elsewhere?

aviation_airport <- crash_data %>%
  filter(!is.na(AirportID)) %>%
  group_by(AirportID) %>%
  summarise(Total_Fatalities = mean(FatalInjuryCount, na.rm = TRUE)) %>%
  arrange(desc(Total_Fatalities))
cat("Fatality rate at airports:\n")
## Fatality rate at airports:
print(aviation_airport)
## # A tibble: 7,691 Γ— 2
##    AirportID Total_Fatalities
##    <fct>                <dbl>
##  1 OPRN                   157
##  2 FMCH                   152
##  3 URSS                   113
##  4 MUHA                   112
##  5 OLBA                    90
##  6 XUBS                    89
##  7 CGK                     62
##  8 RCQC                    58
##  9 WIHH                    44
## 10 ZYLD                    42
## # β„Ή 7,681 more rows

Interpretation:

β€”β€”β€”β€”β€”β€”- Visualization β€”β€”β€”β€”β€”β€”

Q20. How have aviation incidents changed over the years.

ggplot(accident_rates_by_year, aes(x = Year, y = n)) +
  geom_line(color = "steelblue", size = 1) +
  geom_point(color = "darkred", size = 2) +
  labs(title = "Trend of Aviation Incidents Over the Years",
       x = "Year", y = "Incident Count") +
  theme_minimal()
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## β„Ή Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

View(crash_data)

Interpretation:

Q21. What is the distribution of FatalityRate across AirCraftCategory?

ggplot(crash_data, aes(x = FatalityRate, fill = AirCraftCategory)) +
  geom_histogram(binwidth = 5, position = "identity", alpha = 0.7) +
  labs(title = "Distribution of Fatality Rate by Aircraft Category",
       x = "Fatality Rate (%)", y = "Count") +
  theme_minimal() +
  scale_fill_brewer(palette = "Set3")
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_bin()`).
## Warning: The following aesthetics were dropped during statistical transformation: fill.
## β„Ή This can happen when ggplot fails to infer the correct grouping structure in
##   the data.
## β„Ή Did you forget to specify a `group` aesthetic or to convert a numerical
##   variable into a factor?

Interpretation:

Q22. How does the number of incidents vary by state?

ggplot(accidents_per_state, aes(x = reorder(State, -Total_Incidents), y = Total_Incidents)) +
  geom_bar(stat = "identity", fill = "steelblue", alpha = 0.7) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Number of Aviation Incidents by State",
       x = "State", y = "Incident Count") +
  theme_minimal()

Interpretation:

Q23. What are the monthly patterns of aviation incidents?

crash_data$MonthName <- month.name[as.integer(crash_data$EventMonth)]
ggplot(crash_data, aes(x = factor(MonthName, levels = month.name))) +
  geom_bar(fill = "purple") +
  labs(title = "Monthly Distribution of Incidents", x = "Month", y = "Count") +
  theme(axis.text.x = element_text(angle = 45, hjust = 1))

Interpretation:

Q24. Compare average FatalityRate by WeatherCondition.

avg_fatality_weather <- crash_data %>%
  group_by(WeatherCondition) %>%
  summarise(AvgFatalityRate = mean(FatalityRate, na.rm = TRUE))
ggplot(avg_fatality_weather, aes(x = WeatherCondition, y = AvgFatalityRate, fill = WeatherCondition)) +
  geom_bar(stat = "identity") +
  labs(title = "Average Fatality Rate by Weather Condition", x = "Weather Condition", y = "Fatality Rate (%)") +
  theme_minimal()

Interpretation:

β€”β€”β€”β€”β€”β€”- Regression-Based Questions β€”β€”β€”β€”β€”β€”

Q25. Is there a relationship between NumberOfEngines and FatalityRate?

model1 <- lm(FatalityRate ~ NumberOfEngines, data = crash_data)
summary(model1)
## 
## Call:
## lm(formula = FatalityRate ~ NumberOfEngines, data = crash_data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -83.33 -41.33 -41.33  58.67  82.57 
## 
## Coefficients:
##                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            83.079      8.010  10.372  < 2e-16 ***
## NumberOfEngines,0     -83.079     48.061  -1.729   0.0839 .  
## NumberOfEngines,1     -21.968     17.711  -1.240   0.2149    
## NumberOfEngines,2     -83.079     48.061  -1.729   0.0839 .  
## NumberOfEngines0      -65.649      8.393  -7.822 5.44e-15 ***
## NumberOfEngines0,0    -33.079     34.453  -0.960   0.3370    
## NumberOfEngines0,1    -33.079     34.453  -0.960   0.3370    
## NumberOfEngines1      -41.746      8.018  -5.206 1.95e-07 ***
## NumberOfEngines1,     -26.829     18.571  -1.445   0.1486    
## NumberOfEngines1,0    -33.079     48.061  -0.688   0.4913    
## NumberOfEngines1,1    -23.219      8.902  -2.608   0.0091 ** 
## NumberOfEngines1,1,0   16.921     48.061   0.352   0.7248    
## NumberOfEngines1,2      0.254     17.711   0.014   0.9886    
## NumberOfEngines2      -34.743      8.071  -4.305 1.68e-05 ***
## NumberOfEngines2,      16.921     34.453   0.491   0.6233    
## NumberOfEngines2,0    -83.079     48.061  -1.729   0.0839 .  
## NumberOfEngines2,1      3.853     18.571   0.207   0.8357    
## NumberOfEngines2,2    -37.246     20.939  -1.779   0.0753 .  
## NumberOfEngines2,3    -83.079     48.061  -1.729   0.0839 .  
## NumberOfEngines3      -58.377     12.559  -4.648 3.37e-06 ***
## NumberOfEngines4      -48.464     11.034  -4.392 1.13e-05 ***
## NumberOfEngines4,1     16.921     48.061   0.352   0.7248    
## NumberOfEngines8      -83.079     34.453  -2.411   0.0159 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 47.39 on 20196 degrees of freedom
##   (24288 observations deleted due to missingness)
## Multiple R-squared:  0.01076,    Adjusted R-squared:  0.009684 
## F-statistic: 9.986 on 22 and 20196 DF,  p-value: < 2.2e-16
# Visualize Relationship Between NumberOfEngines and FatalityRate
ggplot(crash_data, aes(x = NumberOfEngines, y = FatalityRate)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm", col = "red") +
  labs(title = "Number of Engines vs. Fatality Rate",
       x = "Number of Engines", y = "Fatality Rate (%)") +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 24288 rows containing missing values or values outside the scale range
## (`geom_point()`).

Interpretation:

Q26. Can we predict FatalityRate using WeatherCondition, PurposeOfFlight, and NumberOfEngines?

model3 <- lm(FatalityRate ~ WeatherCondition + PurposeOfFlight + NumberOfEngines, data = crash_data)
summary(model3)
## 
## Call:
## lm(formula = FatalityRate ~ WeatherCondition + PurposeOfFlight + 
##     NumberOfEngines, data = crash_data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -94.98 -39.45 -28.60  60.55  92.52 
## 
## Coefficients: (5 not defined because of singularities)
##                                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                    1.207e+02  1.050e+01  11.502  < 2e-16 ***
## WeatherConditionUnknown       -5.647e+00  3.259e+00  -1.733  0.08318 .  
## WeatherConditionVMC           -3.323e+01  1.178e+00 -28.205  < 2e-16 ***
## PurposeOfFlight,BUS           -8.751e+01  4.719e+01  -1.854  0.06368 .  
## PurposeOfFlight,FERY           5.247e-01  3.660e+01   0.014  0.98856    
## PurposeOfFlight,INST          -8.328e+01  3.395e+01  -2.453  0.01418 *  
## PurposeOfFlight,OWRK           2.095e+01  3.461e+01   0.605  0.54497    
## PurposeOfFlight,PERS          -2.031e+01  2.676e+01  -0.759  0.44787    
## PurposeOfFlightAAPL           -9.769e+01  3.427e+01  -2.850  0.00437 ** 
## PurposeOfFlightAAPL,          -2.905e+01  4.751e+01  -0.611  0.54091    
## PurposeOfFlightAAPL,AAPL      -2.559e+01  1.743e+01  -1.468  0.14202    
## PurposeOfFlightAAPL,PERS       1.249e+01  4.719e+01   0.265  0.79135    
## PurposeOfFlightADRP           -8.821e+01  3.905e+01  -2.259  0.02390 *  
## PurposeOfFlightADRP,          -3.732e+01  4.729e+01  -0.789  0.43005    
## PurposeOfFlightAOBV           -9.118e+01  3.434e+01  -2.655  0.00793 ** 
## PurposeOfFlightAOBV,AOBV      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightASHO           -7.407e+01  3.452e+01  -2.145  0.03193 *  
## PurposeOfFlightASHO,ASHO      -1.022e+01  1.752e+01  -0.583  0.55976    
## PurposeOfFlightBANT           -1.004e+02  3.474e+01  -2.889  0.00386 ** 
## PurposeOfFlightBUS            -8.751e+01  3.417e+01  -2.561  0.01045 *  
## PurposeOfFlightBUS,BUS        -4.572e+01  3.461e+01  -1.321  0.18657    
## PurposeOfFlightBUS,INST       -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightEXEC           -8.844e+01  3.457e+01  -2.558  0.01053 *  
## PurposeOfFlightEXEC,           1.249e+01  4.719e+01   0.265  0.79135    
## PurposeOfFlightEXLD           -9.649e+01  3.462e+01  -2.787  0.00533 ** 
## PurposeOfFlightFERY           -8.540e+01  3.453e+01  -2.473  0.01339 *  
## PurposeOfFlightFERY,PERS       2.095e+01  4.751e+01   0.441  0.65922    
## PurposeOfFlightFIRF           -7.713e+01  3.508e+01  -2.198  0.02793 *  
## PurposeOfFlightFIRF,FIRF       2.095e+01  4.751e+01   0.441  0.65922    
## PurposeOfFlightFLTS           -9.083e+01  3.436e+01  -2.643  0.00822 ** 
## PurposeOfFlightGLDT           -8.479e+01  3.522e+01  -2.407  0.01608 *  
## PurposeOfFlightGLDT,PERS,GLDT  1.249e+01  4.719e+01   0.265  0.79135    
## PurposeOfFlightINST           -1.013e+02  3.425e+01  -2.957  0.00311 ** 
## PurposeOfFlightINST,           2.095e+01  4.751e+01   0.441  0.65922    
## PurposeOfFlightINST,INST       4.584e+00  1.585e+01   0.289  0.77240    
## PurposeOfFlightINST,OWRK      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightINST,PERS      -1.379e+01  1.502e+01  -0.919  0.35834    
## PurposeOfFlightOWRK           -9.911e+01  3.431e+01  -2.888  0.00388 ** 
## PurposeOfFlightOWRK,INST      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightOWRK,OWRK       2.864e+01  2.859e+01   1.002  0.31645    
## PurposeOfFlightOWRK,PERS      -3.751e+01  4.719e+01  -0.795  0.42665    
## PurposeOfFlightPERS           -9.043e+01  3.423e+01  -2.642  0.00826 ** 
## PurposeOfFlightPERS,           1.050e+01  2.527e+01   0.416  0.67769    
## PurposeOfFlightPERS,AOBV       2.095e+01  3.461e+01   0.605  0.54497    
## PurposeOfFlightPERS,ASHO       2.095e+01  4.751e+01   0.441  0.65922    
## PurposeOfFlightPERS,BUS        3.307e+01  5.000e+01   0.661  0.50839    
## PurposeOfFlightPERS,GLDT      -3.751e+01  3.417e+01  -1.098  0.27233    
## PurposeOfFlightPERS,INST       1.282e+01  1.811e+01   0.708  0.47917    
## PurposeOfFlightPERS,OWRK       8.529e+00  5.093e+01   0.167  0.86701    
## PurposeOfFlightPERS,PERS      -3.283e+01  1.258e+01  -2.610  0.00906 ** 
## PurposeOfFlightPERS,POSI      -1.026e+01  3.577e+01  -0.287  0.77423    
## PurposeOfFlightPERS,UNK       -8.282e+00  3.395e+01  -0.244  0.80730    
## PurposeOfFlightPOSI           -8.809e+01  3.430e+01  -2.568  0.01024 *  
## PurposeOfFlightPOSI,BUS       -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightPOSI,PERS       6.800e+00  5.077e+01   0.134  0.89345    
## PurposeOfFlightPOSI,POSI       2.095e+01  4.751e+01   0.441  0.65922    
## PurposeOfFlightPUBF           -9.588e+01  3.485e+01  -2.751  0.00594 ** 
## PurposeOfFlightPUBL           -1.127e+02  3.506e+01  -3.214  0.00131 ** 
## PurposeOfFlightPUBL,PUBL      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightPUBS           -1.005e+02  3.516e+01  -2.860  0.00424 ** 
## PurposeOfFlightPUBS,PERS      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightPUBS,PUBS       8.529e+00  5.093e+01   0.167  0.86701    
## PurposeOfFlightPUBU           -9.562e+01  3.450e+01  -2.772  0.00558 ** 
## PurposeOfFlightPUBU,INST       1.249e+01  4.719e+01   0.265  0.79135    
## PurposeOfFlightPUBU,PUBU       7.748e+01  5.137e+01   1.508  0.13153    
## PurposeOfFlightSKYD           -1.000e+02  3.463e+01  -2.888  0.00388 ** 
## PurposeOfFlightSKYD,SKYD      -7.905e+01  4.751e+01  -1.664  0.09615 .  
## PurposeOfFlightUNK            -6.951e+01  3.429e+01  -2.027  0.04267 *  
## PurposeOfFlightUNK,INST       -2.417e-11  6.509e+01   0.000  1.00000    
## PurposeOfFlightUNK,PERS       -2.438e+01  2.878e+01  -0.847  0.39688    
## PurposeOfFlightUNK,UNK         1.121e+01  2.168e+01   0.517  0.60528    
## NumberOfEngines,0             -7.730e+01  4.879e+01  -1.584  0.11317    
## NumberOfEngines,1             -9.417e-01  1.940e+01  -0.049  0.96129    
## NumberOfEngines,2             -1.207e+02  4.721e+01  -2.558  0.01054 *  
## NumberOfEngines0               2.124e+01  3.270e+01   0.650  0.51588    
## NumberOfEngines0,0            -1.599e+01  3.465e+01  -0.461  0.64446    
## NumberOfEngines0,1                    NA         NA      NA       NA    
## NumberOfEngines1               4.236e+01  3.261e+01   1.299  0.19386    
## NumberOfEngines1,             -2.059e+01  2.001e+01  -1.029  0.30361    
## NumberOfEngines1,0                    NA         NA      NA       NA    
## NumberOfEngines1,1            -8.466e+00  1.096e+01  -0.773  0.43972    
## NumberOfEngines1,1,0                  NA         NA      NA       NA    
## NumberOfEngines1,2             3.956e+00  2.137e+01   0.185  0.85314    
## NumberOfEngines2               4.375e+01  3.261e+01   1.341  0.17980    
## NumberOfEngines2,              1.249e+01  4.719e+01   0.265  0.79135    
## NumberOfEngines2,0            -6.720e+01  5.312e+01  -1.265  0.20586    
## NumberOfEngines2,1             5.685e+00  2.097e+01   0.271  0.78631    
## NumberOfEngines2,2            -6.499e+01  2.422e+01  -2.683  0.00730 ** 
## NumberOfEngines2,3                    NA         NA      NA       NA    
## NumberOfEngines3               2.106e+01  3.393e+01   0.621  0.53484    
## NumberOfEngines4               3.398e+01  3.343e+01   1.016  0.30941    
## NumberOfEngines4,1             2.270e+01  4.879e+01   0.465  0.64171    
## NumberOfEngines8                      NA         NA      NA       NA    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 46.02 on 20131 degrees of freedom
##   (24288 observations deleted due to missingness)
## Multiple R-squared:  0.06994,    Adjusted R-squared:  0.06592 
## F-statistic:  17.4 on 87 and 20131 DF,  p-value: < 2.2e-16

Interpretation:

Q27. Does latitude (location) influence fatality rate?

model4 <- lm(FatalityRate ~ Latitude, data = crash_data)
summary(model4)
## 
## Call:
## lm(formula = FatalityRate ~ Latitude, data = crash_data)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -41.94 -41.94 -41.94  58.06  58.30 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  4.194e+01  3.349e-01 125.241   <2e-16 ***
## Latitude    -9.913e-07  1.151e-06  -0.861    0.389    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 47.62 on 20217 degrees of freedom
##   (24288 observations deleted due to missingness)
## Multiple R-squared:  3.668e-05,  Adjusted R-squared:  -1.278e-05 
## F-statistic: 0.7416 on 1 and 20217 DF,  p-value: 0.3892

Visualize Relationship Between Latitude and FatalityRate

ggplot(crash_data, aes(x = Latitude, y = FatalityRate)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm", col = "tomato") +
  labs(title = "Latitude vs. Fatality Rate",
       x = "Latitude", y = "Fatality Rate (%)") +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 24288 rows containing missing values or values outside the scale range
## (`geom_point()`).

Interpretation:

Q28. Does the Number of Fatal, Serious, and Minor Injuries Predict the Fatality Rate?

model2 <- lm(FatalityRate ~ FatalInjuryCount + SeriousInjuryCount + MinorInjuryCount, data = crash_data)
summary(model2)
## 
## Call:
## lm(formula = FatalityRate ~ FatalInjuryCount + SeriousInjuryCount + 
##     MinorInjuryCount, data = crash_data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -326.55  -40.53  -33.35   53.65  573.84 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)        43.77816    0.33835  129.39   <2e-16 ***
## FatalInjuryCount    1.28447    0.04137   31.05   <2e-16 ***
## SeriousInjuryCount -5.21321    0.19925  -26.16   <2e-16 ***
## MinorInjuryCount   -1.62530    0.08724  -18.63   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 45.41 on 20215 degrees of freedom
##   (24288 observations deleted due to missingness)
## Multiple R-squared:  0.09096,    Adjusted R-squared:  0.09083 
## F-statistic: 674.3 on 3 and 20215 DF,  p-value: < 2.2e-16
# Visualize Relationship Between FatalInjuryCount and FatalityRate
ggplot(crash_data, aes(x = FatalInjuryCount, y = FatalityRate)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm", col = "red") +
  labs(title = "Fatal Injury Count vs. Fatality Rate",
       x = "Fatal Injury Count", y = "Fatality Rate (%)") +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 24288 rows containing missing values or values outside the scale range
## (`geom_point()`).

Interpretation:

Q29. Can Year (from EventDate) explain variation in FatalInjuryCount?

crash_data$Year <- as.numeric(substr(crash_data$EventDate, 1, 4))
model5 <- lm(FatalInjuryCount ~ Year, data = crash_data) 
summary(model5)
## 
## Call:
## lm(formula = FatalInjuryCount ~ Year, data = crash_data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
##  -0.759  -0.667  -0.575  -0.456 297.425 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 27.117413   6.911479   3.924 8.74e-05 ***
## Year        -0.013179   0.003436  -3.835 0.000126 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 5.282 on 44505 degrees of freedom
## Multiple R-squared:  0.0003304,  Adjusted R-squared:  0.0003079 
## F-statistic: 14.71 on 1 and 44505 DF,  p-value: 0.0001256
# Visualize Relationship Between Year and FatalInjuryCount
ggplot(crash_data, aes(x = Year, y = FatalInjuryCount)) +
  geom_point(alpha = 0.5) +
  geom_smooth(method = "lm", col = "blue") +
  labs(title = "Year vs. Fatal Injury Count",
       x = "Year", y = "Fatal Injury Count") +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'

str(crash_data)
## tibble [44,507 Γ— 39] (S3: tbl_df/tbl/data.frame)
##  $ NtsbNo             : Factor w/ 44507 levels "ANC00FA024","ANC00FA052",..: 25234 2575 44506 11169 25169 15984 16017 16018 11168 11166 ...
##  $ EventType          : Factor w/ 3 levels "ACC","INC","OCC": 1 1 1 1 1 1 1 1 1 1 ...
##  $ Mkey               : num [1:44507] 199500 199498 199524 199496 199492 ...
##  $ EventDate          : POSIXct[1:44507], format: "2025-01-01 02:20:00" "2024-12-31 14:30:00" ...
##  $ City               : Factor w/ 13793 levels "40 nm vicinity south of Lake Jackson",..: 8366 307 7010 4333 9397 4842 8222 9088 8017 9317 ...
##  $ State              : Factor w/ 57 levels "Alabama","Alaska",..: 12 2 35 50 39 6 6 6 19 20 ...
##  $ Country            : Factor w/ 190 levels "Afghanistan",..: 179 179 179 179 179 179 141 128 179 179 ...
##  $ ReportNo           : Factor w/ 94 levels "AAB0202","AAB0203",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ N                  : Factor w/ 42077 levels "(H-VISTA",",",..: 33019 14854 28743 18403 28076 26450 2592 39899 19803 29142 ...
##  $ HasSafetyRec       : logi [1:44507] FALSE FALSE FALSE FALSE FALSE FALSE ...
##  $ ReportType         : Factor w/ 4 levels "BoardBrief","DirectorBrief",..: 2 2 2 2 2 2 3 2 2 2 ...
##  $ OriginalPublishDate: POSIXct[1:44507], format: NA NA ...
##  $ HighestInjuryLevel : Factor w/ 4 levels "Fatal","Minor",..: 3 3 3 3 1 4 1 3 3 4 ...
##  $ FatalInjuryCount   : num [1:44507] 0 0 0 0 1 0 173 0 0 0 ...
##  $ SeriousInjuryCount : num [1:44507] 0 0 0 0 0 1 2 0 0 1 ...
##  $ MinorInjuryCount   : num [1:44507] 0 0 0 0 0 0 0 0 0 0 ...
##  $ ProbableCause      : Factor w/ 34533 levels "'THIS CASE WAS MODIFIED MAY 30, 2006.'The airplane's inadvertent impact with one of several deer that had enter"| __truncated__,..: 1443 1443 1443 29635 1443 1443 1443 1443 1443 1443 ...
##  $ Latitude           : num [1:44507] 26.2 61.2 35.9 29.3 39 ...
##  $ Longitude          : num [1:44507] -81.8 -149.8 -106.3 -94.8 -83.4 ...
##  $ Make               : chr [1:44507] "BEECH" "CESSNA" "CESSNA" "ROBINSON HELICOPTER" ...
##  $ Model              : Factor w/ 8860 levels "-","-269C","(EX) RV-6",..: 1739 260 365 6730 664 1354 1093 1093 3405 3340 ...
##  $ AirCraftCategory   : int [1:44507] 3 3 3 21 3 3 3 3 3 3 ...
##  $ AirportID          : Factor w/ 7691 levels "-","---","(AZ38)",..: 2154 2132 4953 5780 5781 5781 5781 5781 5622 5781 ...
##  $ AirportName        : Factor w/ 14914 levels "---","-70.8301542",..: 9243 8574 10775 10815 10775 10775 10775 10775 10775 10775 ...
##  $ AmateurBuilt       : logi [1:44507] FALSE FALSE FALSE FALSE FALSE FALSE ...
##  $ NumberOfEngines    : Factor w/ 34 levels ",",",,",",0",..: 11 11 11 11 18 11 11 11 11 11 ...
##  $ Scheduled          : Factor w/ 3 levels "NSCH","SCHD",..: 1 1 1 1 1 2 2 1 1 1 ...
##  $ PurposeOfFlight    : Factor w/ 99 levels ",",",,",",AOBV",..: 61 48 61 75 37 61 61 61 61 61 ...
##  $ FAR                : Factor w/ 69 levels ",","091,ARMF",..: 39 39 39 39 39 26 48 39 39 39 ...
##  $ AirCraftDamage     : Factor w/ 28 levels ",","Destroyed",..: 19 19 19 19 19 19 19 19 19 19 ...
##  $ WeatherCondition   : Factor w/ 3 levels "IMC","Unknown",..: 1 3 3 3 3 3 3 3 3 3 ...
##  $ Operator           : Factor w/ 16956 levels "--","– M/s Jindal Steel & Power Ltd.",..: 11965 11965 11965 6228 11965 15729 8175 9086 9736 11965 ...
##  $ ReportStatus       : Factor w/ 3 levels "Completed","In work",..: 2 2 2 1 2 2 3 3 2 2 ...
##  $ RepGenFlag         : logi [1:44507] FALSE FALSE FALSE FALSE FALSE FALSE ...
##  $ IncidentSeverity   : chr [1:44507] "No Injury" "No Injury" "No Injury" "No Injury" ...
##  $ FatalityRate       : num [1:44507] NaN NaN NaN NaN 100 ...
##  $ EventMonth         : num [1:44507] 1 12 12 12 12 12 12 12 12 12 ...
##  $ MonthName          : chr [1:44507] "January" "December" "December" "December" ...
##  $ Year               : num [1:44507] 2025 2024 2024 2024 2024 ...

Interpretation:

β€”β€”β€”β€”β€”β€”- ANOVA β€”β€”β€”β€”β€”β€”

Q30. Which aircraft category has the highest variation in FatalityRate?

crash_data$AirCraftCategory <- as.factor(crash_data$AirCraftCategory)
anova_model <- aov(FatalityRate ~ AirCraftCategory, data = crash_data)
anova_results <- summary(anova_model)
print(anova_results)
##                     Df   Sum Sq Mean Sq F value Pr(>F)    
## AirCraftCategory    27   598097   22152   9.884 <2e-16 ***
## Residuals        20191 45250185    2241                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 24288 observations deleted due to missingness
TukeyHSD(anova_model)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = FatalityRate ~ AirCraftCategory, data = crash_data)
## 
## $AirCraftCategory
##                diff          lwr         upr     p adj
## 3-1   -5.710680e+01 -158.6553507  44.4417594 0.9522062
## 5-1   -3.616783e+01 -138.5360164  66.2003648 0.9999686
## 7-1   -5.244658e-10 -203.0785695 203.0785695 1.0000000
## 8-1   -4.250000e+01 -176.8238478  91.8238478 0.9999966
## 9-1   -1.590909e+01 -130.4608532  98.6426714 1.0000000
## 10-1  -5.245795e-10 -160.5477059 160.5477059 1.0000000
## 12-1  -9.216900e+01 -194.2771381   9.9391353 0.1518235
## 13-1  -1.000000e+02 -260.5477059  60.5477059 0.8658929
## 15-1  -8.000000e+01 -208.4381647  48.4381647 0.8658929
## 16-1  -5.000000e+01 -253.0785695 153.0785695 1.0000000
## 17-1  -6.723485e+01 -169.2059110  34.7362140 0.7850985
## 18-1  -3.333333e+01 -176.9315669 110.2649002 1.0000000
## 19-1  -7.000000e+01 -198.4381647  58.4381647 0.9667616
## 20-1  -5.685654e+01 -159.3552724  45.6421923 0.9591170
## 21-1  -6.042149e+01 -162.0222448  41.1792660 0.9134582
## 22-1  -5.370370e+01 -178.0634219  70.6560145 0.9988106
## 23-1  -2.878788e+01 -143.3396411  85.7638836 1.0000000
## 27-1  -1.000000e+02 -303.0785695 103.0785695 0.9911205
## 28-1  -8.368421e+01 -186.8142859  19.4458648 0.3444616
## 29-1  -5.000000e+01 -253.0785695 153.0785695 1.0000000
## 30-1  -6.666667e+01 -210.2649002  76.9315669 0.9962495
## 31-1  -6.060606e+01 -166.6603846  45.4482634 0.9429121
## 32-1  -5.030500e-10 -203.0785695 203.0785695 1.0000000
## 33-1  -4.204545e+01 -161.1108199  77.0199108 0.9999689
## 34-1  -5.191225e-10 -203.0785695 203.0785695 1.0000000
## 35-1  -1.000000e+02 -228.4381647  28.4381647 0.4365639
## 38-1  -5.894040e+01 -161.4833897  43.6025950 0.9392129
## 5-3    2.093897e+01    7.8659904  34.0119493 0.0000010
## 7-3    5.710680e+01 -118.7697569 232.9833481 0.9999943
## 8-3    1.460680e+01  -73.3395087 102.5531000 1.0000000
## 9-3    4.119770e+01  -11.8472064  94.2426159 0.4422323
## 10-3   5.710680e+01  -67.2604919 181.4740831 0.9968307
## 12-3  -3.506221e+01  -45.9124559 -24.2119557 0.0000000
## 13-3  -4.289320e+01 -167.2604919  81.4740831 0.9999805
## 15-3  -2.289320e+01 -101.5571637  55.7707549 0.9999994
## 16-3   7.106796e+00 -168.7697569 182.9833481 1.0000000
## 17-3  -1.012805e+01  -19.6019082  -0.6541975 0.0199686
## 18-3   2.377346e+01  -77.7750927 125.3220173 1.0000000
## 19-3  -1.289320e+01  -91.5571637  65.7707549 1.0000000
## 20-3   2.502556e-01  -13.8084243  14.3089354 1.0000000
## 21-3  -3.314694e+00   -7.1054511   0.4760636 0.2004908
## 22-3   3.403092e+00  -68.4091345  75.2153183 1.0000000
## 23-3   2.831892e+01  -24.7259943  81.3638280 0.9741422
## 27-3  -4.289320e+01 -218.7697569 132.9833481 1.0000000
## 28-3  -2.657741e+01  -44.6735134  -8.4813163 0.0000181
## 29-3   7.106796e+00 -168.7697569 182.9833481 1.0000000
## 30-3  -9.559871e+00 -111.1084261  91.9886840 1.0000000
## 31-3  -3.499265e+00  -34.1452434  27.1467134 1.0000000
## 32-3   5.710680e+01 -118.7697569 232.9833481 0.9999943
## 33-3   1.506134e+01  -47.1336552  77.2563374 1.0000000
## 34-3   5.710680e+01 -118.7697569 232.9833481 0.9999943
## 35-3  -4.289320e+01 -121.5571637  35.7707549 0.9665705
## 38-3  -1.833602e+00  -16.2114187  12.5442153 1.0000000
## 7-5    3.616783e+01 -140.1832421 212.5188937 1.0000000
## 8-5   -6.332174e+00  -95.2236241  82.5592757 1.0000000
## 9-5    2.025873e+01  -34.3388843  74.8563540 0.9999195
## 10-5   3.616783e+01  -88.8696071 161.2052587 0.9999995
## 12-5  -5.600118e+01  -72.8791300 -39.1232212 0.0000000
## 13-5  -6.383217e+01 -188.8696071  61.2052587 0.9854512
## 15-5  -4.383217e+01 -123.5514059  35.8870575 0.9631086
## 16-5  -1.383217e+01 -190.1832421 162.5188937 1.0000000
## 17-5  -3.106702e+01  -47.0948532 -15.0391922 0.0000000
## 18-5   2.834492e+00  -99.5336981 105.2026831 1.0000000
## 19-5  -3.383217e+01 -113.5514059  45.8870575 0.9991100
## 20-5  -2.068871e+01  -39.7880309  -1.5893977 0.0163409
## 21-5  -2.425366e+01  -37.7261266 -10.7812007 0.0000000
## 22-5  -1.753588e+01  -90.5025366  55.4307808 1.0000000
## 23-5   7.379947e+00  -47.2176721  61.9775662 1.0000000
## 27-5  -6.383217e+01 -240.1832421 112.5188937 0.9999498
## 28-5  -4.751638e+01  -69.7561284 -25.2766410 0.0000000
## 29-5  -1.383217e+01 -190.1832421 162.5188937 1.0000000
## 30-5  -3.049884e+01 -132.8670315  71.8693497 0.9999991
## 31-5  -2.443823e+01  -57.6995247   8.8230551 0.5693730
## 32-5   3.616783e+01 -140.1832421 212.5188937 1.0000000
## 33-5  -5.877629e+00  -69.4020727  57.6468152 1.0000000
## 34-5   3.616783e+01 -140.1832421 212.5188937 1.0000000
## 35-5  -6.383217e+01 -143.5514059  15.8870575 0.3734881
## 38-5  -2.277257e+01  -42.1080063  -3.4371368 0.0038836
## 8-7   -4.250000e+01 -239.1299794 154.1299794 1.0000000
## 9-7   -1.590909e+01 -199.6005685 167.7823867 1.0000000
## 10-7  -1.136868e-13 -215.3973504 215.3973504 1.0000000
## 12-7  -9.216900e+01 -268.3692405  84.0312377 0.9799984
## 13-7  -1.000000e+02 -315.3973504 115.3973504 0.9962495
## 15-7  -8.000000e+01 -272.6572470 112.6572470 0.9993854
## 16-7  -5.000000e+01 -298.7194364 198.7194364 1.0000000
## 17-7  -6.723485e+01 -243.3556885 108.8859915 0.9998630
## 18-7  -3.333333e+01 -236.4119028 169.7452361 1.0000000
## 19-7  -7.000000e+01 -262.6572470 122.6572470 0.9999460
## 20-7  -5.685654e+01 -233.2834168 119.5703366 0.9999951
## 21-7  -6.042149e+01 -236.3281868 115.4852080 0.9999820
## 22-7  -5.370370e+01 -243.6663111 136.2589037 0.9999997
## 23-7  -2.878788e+01 -212.4793564 154.9035988 1.0000000
## 27-7  -1.000000e+02 -348.7194364 148.7194364 0.9996499
## 28-7  -8.368421e+01 -260.4786254  93.1102043 0.9949827
## 29-7  -5.000000e+01 -298.7194364 198.7194364 1.0000000
## 30-7  -6.666667e+01 -269.7452361 136.4119028 0.9999928
## 31-7  -6.060606e+01 -239.1220888 117.9099676 0.9999858
## 32-7   2.141576e-11 -248.7194364 248.7194364 1.0000000
## 33-7  -4.204545e+01 -228.5850319 144.4941228 1.0000000
## 34-7   5.343281e-12 -248.7194364 248.7194364 1.0000000
## 35-7  -1.000000e+02 -292.6572470  92.6572470 0.9818994
## 38-7  -5.894040e+01 -235.3929914 117.5121967 0.9999897
## 9-8    2.659091e+01  -76.0957486 129.2775668 1.0000000
## 10-8   4.250000e+01 -109.8089271 194.8089271 0.9999998
## 12-8  -4.966900e+01 -138.2608464  38.9228436 0.9538196
## 13-8  -5.750000e+01 -209.8089271  94.8089271 0.9998886
## 15-8  -3.750000e+01 -155.4779876  80.4779876 0.9999963
## 16-8  -7.500000e+00 -204.1299794 189.1299794 1.0000000
## 17-8  -2.473485e+01 -113.1686712  63.6989743 0.9999998
## 18-8   9.166667e+00 -125.1571812 143.4905145 1.0000000
## 19-8  -2.750000e+01 -145.4779876  90.4779876 1.0000000
## 20-8  -1.435654e+01 -103.3982918  74.6852116 1.0000000
## 21-8  -1.792149e+01 -105.9280625  70.0850837 1.0000000
## 22-8  -1.120370e+01 -124.7280752 102.3206678 1.0000000
## 23-8   1.371212e+01  -88.9745365 116.3987789 1.0000000
## 27-8  -5.750000e+01 -254.1299794 139.1299794 0.9999994
## 28-8  -4.118421e+01 -130.9519990  48.5835780 0.9968722
## 29-8  -7.500000e+00 -204.1299794 189.1299794 1.0000000
## 30-8  -2.416667e+01 -158.4905145 110.1571812 1.0000000
## 31-8  -1.810606e+01 -111.2186970  75.0065758 1.0000000
## 32-8   4.250000e+01 -154.1299794 239.1299794 1.0000000
## 33-8   4.545455e-01 -107.2441297 108.1532206 1.0000000
## 34-8   4.250000e+01 -154.1299794 239.1299794 1.0000000
## 35-8  -5.750000e+01 -175.4779876  60.4779876 0.9923244
## 38-8  -1.644040e+01 -105.5330945  72.6522998 1.0000000
## 10-9   1.590909e+01 -119.2841760 151.1023579 1.0000000
## 12-9  -7.625991e+01 -130.3683678 -22.1514532 0.0000601
## 13-9  -8.409091e+01 -219.2841760  51.1023579 0.8675462
## 15-9  -6.409091e+01 -158.9487802  30.7669621 0.7428085
## 16-9  -3.409091e+01 -217.7823867 149.6005685 1.0000000
## 17-9  -5.132576e+01 -105.1750952   2.5235800 0.0878026
## 18-9  -1.742424e+01 -131.9760048  97.1275199 1.0000000
## 19-9  -5.409091e+01 -148.9487802  40.7669621 0.9442400
## 20-9  -4.094745e+01  -95.7894377  13.8945393 0.5328199
## 21-9  -4.451240e+01  -97.6571731   8.6323761 0.2789476
## 22-9  -3.779461e+01 -127.0526269  51.4634013 0.9991433
## 23-9  -1.287879e+01  -87.8705196  62.1129438 1.0000000
## 27-9  -8.409091e+01 -267.7823867  99.6005685 0.9969761
## 28-9  -6.777512e+01 -123.7882074 -11.7620318 0.0022929
## 29-9  -3.409091e+01 -217.7823867 149.6005685 1.0000000
## 30-9  -5.075758e+01 -165.3093381  63.7941866 0.9981914
## 31-9  -4.469697e+01 -105.9274622  16.5335228 0.5839572
## 32-9   1.590909e+01 -167.7823867 199.6005685 1.0000000
## 33-9  -2.613636e+01 -107.8567087  55.5839814 0.9999958
## 34-9   1.590909e+01 -167.7823867 199.6005685 1.0000000
## 35-9  -8.409091e+01 -178.9487802  10.7669621 0.1784741
## 38-9  -4.303131e+01  -97.9559716  11.8933587 0.4223383
## 12-10 -9.216900e+01 -216.9936174  32.6556146 0.5581581
## 13-10 -1.000000e+02 -275.8712001  75.8712001 0.9459669
## 15-10 -8.000000e+01 -227.1444030  67.1444030 0.9677157
## 16-10 -5.000000e+01 -265.3973504 165.3973504 1.0000000
## 17-10 -6.723485e+01 -191.9473609  57.4776640 0.9708412
## 18-10 -3.333333e+01 -193.8810392 127.2143725 1.0000000
## 19-10 -7.000000e+01 -217.1444030  77.1444030 0.9945963
## 20-10 -5.685654e+01 -182.0008700  68.2877898 0.9973119
## 21-10 -6.042149e+01 -184.8314033  63.9884244 0.9927015
## 22-10 -5.370370e+01 -197.3019373  89.8945299 0.9999066
## 23-10 -2.878788e+01 -163.9811457 106.4053882 1.0000000
## 27-10 -1.000000e+02 -315.3973504 115.3973504 0.9962495
## 28-10 -8.368421e+01 -209.3461603  41.9777392 0.7683968
## 29-10 -5.000000e+01 -265.3973504 165.3973504 1.0000000
## 30-10 -6.666667e+01 -227.2143725  93.8810392 0.9993854
## 31-10 -6.060606e+01 -188.6788244  67.4667032 0.9950025
## 32-10  2.152944e-11 -215.3973504 215.3973504 1.0000000
## 33-10 -4.204545e+01 -181.0838463  96.9929373 0.9999987
## 34-10  5.456968e-12 -215.3973504 215.3973504 1.0000000
## 35-10 -1.000000e+02 -247.1444030  47.1444030 0.7320684
## 38-10 -5.894040e+01 -184.1209807  66.2401860 0.9953628
## 13-12 -7.830999e+00 -132.6556146 116.9936174 1.0000000
## 15-12  1.216900e+01  -67.2160164  91.5540192 1.0000000
## 16-12  4.216900e+01 -134.0312377 218.3692405 1.0000000
## 17-12  2.493415e+01   10.6612245  39.2070814 0.0000000
## 18-12  5.883567e+01  -43.2724686 160.9438048 0.9375794
## 19-12  2.216900e+01  -57.2160164 101.5540192 0.9999998
## 20-12  3.531246e+01   17.6600102  52.9649125 0.0000000
## 21-12  3.174751e+01   20.4191232  43.0759008 0.0000000
## 22-12  3.846530e+01  -34.1360688 111.0666642 0.9764838
## 23-12  6.338112e+01    9.2726653 117.4895799 0.0043021
## 27-12 -7.830999e+00 -184.0312377 168.3692405 1.0000000
## 28-12  8.484791e+00  -12.5254765  29.4950583 0.9996215
## 29-12  4.216900e+01 -134.0312377 218.3692405 1.0000000
## 30-12  2.550233e+01  -76.6058020 127.6104715 1.0000000
## 31-12  3.156294e+01   -0.8891553  64.0150369 0.0699221
## 32-12  9.216900e+01  -84.0312377 268.3692405 0.9799984
## 33-12  5.012355e+01  -12.9809706 113.2280643 0.3913691
## 34-12  9.216900e+01  -84.0312377 268.3692405 0.9799984
## 35-12 -7.830999e+00  -87.2160164  71.5540192 1.0000000
## 38-12  3.322860e+01   15.3209472  51.1362609 0.0000000
## 15-13  2.000000e+01 -127.1444030 167.1444030 1.0000000
## 16-13  5.000000e+01 -165.3973504 265.3973504 1.0000000
## 17-13  3.276515e+01  -91.9473609 157.4776640 0.9999999
## 18-13  6.666667e+01  -93.8810392 227.2143725 0.9993854
## 19-13  3.000000e+01 -117.1444030 177.1444030 1.0000000
## 20-13  4.314346e+01  -82.0008700 168.2877898 0.9999807
## 21-13  3.957851e+01  -84.8314033 163.9884244 0.9999962
## 22-13  4.629630e+01  -97.3019373 189.8945299 0.9999950
## 23-13  7.121212e+01  -63.9811457 206.4053882 0.9781456
## 27-13 -3.053202e-11 -215.3973504 215.3973504 1.0000000
## 28-13  1.631579e+01 -109.3461603 141.9777392 1.0000000
## 29-13  5.000000e+01 -165.3973504 265.3973504 1.0000000
## 30-13  3.333333e+01 -127.2143725 193.8810392 1.0000000
## 31-13  3.939394e+01  -88.6788244 167.4667032 0.9999981
## 32-13  1.000000e+02 -115.3973504 315.3973504 0.9962495
## 33-13  5.795455e+01  -81.0838463 196.9929373 0.9993441
## 34-13  1.000000e+02 -115.3973504 315.3973504 0.9962495
## 35-13  1.094236e-11 -147.1444030 147.1444030 1.0000000
## 38-13  4.105960e+01  -84.1209807 166.2401860 0.9999929
## 16-15  3.000000e+01 -162.6572470 222.6572470 1.0000000
## 17-15  1.276515e+01  -66.4434784  91.9737814 1.0000000
## 18-15  4.666667e+01  -81.7714980 175.1048314 0.9999460
## 19-15  1.000000e+01 -101.2307134 121.2307134 1.0000000
## 20-15  2.314346e+01  -56.7433325 103.0302523 0.9999995
## 21-15  1.957851e+01  -59.1528235  98.3098446 1.0000000
## 22-15  2.629630e+01  -80.1990040 132.7915966 1.0000000
## 23-15  5.121212e+01  -43.6457499 146.0699924 0.9703351
## 27-15 -2.000000e+01 -212.6572470 172.6572470 1.0000000
## 28-15 -3.684211e+00  -84.3794514  77.0110304 1.0000000
## 29-15  3.000000e+01 -162.6572470 222.6572470 1.0000000
## 30-15  1.333333e+01 -115.1048314 141.7714980 1.0000000
## 31-15  1.939394e+01  -65.0064700 103.7943488 1.0000000
## 32-15  8.000000e+01 -112.6572470 272.6572470 0.9993854
## 33-15  3.795455e+01  -62.3074647 138.2165556 0.9998828
## 34-15  8.000000e+01 -112.6572470 272.6572470 0.9993854
## 35-15 -2.000000e+01 -131.2307134  91.2307134 1.0000000
## 38-15  2.105960e+01  -58.8839696 101.0031749 0.9999999
## 17-16 -1.723485e+01 -193.3556885 158.8859915 1.0000000
## 18-16  1.666667e+01 -186.4119028 219.7452361 1.0000000
## 19-16 -2.000000e+01 -212.6572470 172.6572470 1.0000000
## 20-16 -6.856540e+00 -183.2834168 169.5703366 1.0000000
## 21-16 -1.042149e+01 -186.3281868 165.4852080 1.0000000
## 22-16 -3.703704e+00 -193.6663111 186.2589037 1.0000000
## 23-16  2.121212e+01 -162.4793564 204.9035988 1.0000000
## 27-16 -5.000000e+01 -298.7194364 198.7194364 1.0000000
## 28-16 -3.368421e+01 -210.4786254 143.1102043 1.0000000
## 29-16  2.806644e-12 -248.7194364 248.7194364 1.0000000
## 30-16 -1.666667e+01 -219.7452361 186.4119028 1.0000000
## 31-16 -1.060606e+01 -189.1220888 167.9099676 1.0000000
## 32-16  5.000000e+01 -198.7194364 298.7194364 1.0000000
## 33-16  7.954545e+00 -178.5850319 194.4941228 1.0000000
## 34-16  5.000000e+01 -198.7194364 298.7194364 1.0000000
## 35-16 -5.000000e+01 -242.6572470 142.6572470 1.0000000
## 38-16 -8.940397e+00 -185.3929914 167.5121967 1.0000000
## 18-17  3.390152e+01  -68.0695474 135.8725777 0.9999907
## 19-17 -2.765152e+00  -81.9737814  76.4434784 1.0000000
## 20-17  1.037831e+01   -6.4631594  27.2197762 0.8782856
## 21-17  6.813359e+00   -3.2045449  16.8312631 0.7306598
## 22-17  1.353114e+01  -58.8773107  85.9396002 1.0000000
## 23-17  3.844697e+01  -15.4023679  92.2963073 0.6326379
## 27-17 -3.276515e+01 -208.8859915 143.3556885 1.0000000
## 28-17 -1.644936e+01  -36.7830125   3.8842884 0.3510439
## 29-17  1.723485e+01 -158.8859915 193.3556885 1.0000000
## 30-17  5.681818e-01 -101.4028807 102.5392443 1.0000000
## 31-17  6.628788e+00  -25.3894031  38.6469788 1.0000000
## 32-17  6.723485e+01 -108.8859915 243.3556885 0.9998630
## 33-17  2.518939e+01  -37.6930847  88.0718726 0.9996721
## 34-17  6.723485e+01 -108.8859915 243.3556885 0.9998630
## 35-17 -3.276515e+01 -111.9737814  46.4434784 0.9994247
## 38-17  8.294451e+00   -8.8143238  25.4032261 0.9928843
## 19-18 -3.666667e+01 -165.1048314  91.7714980 0.9999996
## 20-18 -2.352321e+01 -126.0219391  78.9755256 1.0000000
## 21-18 -2.708816e+01 -128.6889115  74.5125993 0.9999999
## 22-18 -2.037037e+01 -144.7300886 103.9893478 1.0000000
## 23-18  4.545455e+00 -110.0063078 119.0972169 1.0000000
## 27-18 -6.666667e+01 -269.7452361 136.4119028 0.9999928
## 28-18 -5.035088e+01 -153.4809525  52.7791981 0.9921320
## 29-18 -1.666667e+01 -219.7452361 186.4119028 1.0000000
## 30-18 -3.333333e+01 -176.9315669 110.2649002 1.0000000
## 31-18 -2.727273e+01 -133.3270513  78.7815968 1.0000000
## 32-18  3.333333e+01 -169.7452361 236.4119028 1.0000000
## 33-18 -8.712121e+00 -127.7774865 110.3532441 1.0000000
## 34-18  3.333333e+01 -169.7452361 236.4119028 1.0000000
## 35-18 -6.666667e+01 -195.1048314  61.7714980 0.9818994
## 38-18 -2.560706e+01 -128.1500564  76.9359283 1.0000000
## 20-19  1.314346e+01  -66.7433325  93.0302523 1.0000000
## 21-19  9.578511e+00  -69.1528235  88.3098446 1.0000000
## 22-19  1.629630e+01  -90.1990040 122.7915966 1.0000000
## 23-19  4.121212e+01  -53.6457499 136.0699924 0.9986861
## 27-19 -3.000000e+01 -222.6572470 162.6572470 1.0000000
## 28-19 -1.368421e+01  -94.3794514  67.0110304 1.0000000
## 29-19  2.000000e+01 -172.6572470 212.6572470 1.0000000
## 30-19  3.333333e+00 -125.1048314 131.7714980 1.0000000
## 31-19  9.393939e+00  -75.0064700  93.7943488 1.0000000
## 32-19  7.000000e+01 -122.6572470 262.6572470 0.9999460
## 33-19  2.795455e+01  -72.3074647 128.2165556 0.9999998
## 34-19  7.000000e+01 -122.6572470 262.6572470 0.9999460
## 35-19 -3.000000e+01 -141.2307134  81.2307134 0.9999999
## 38-19  1.105960e+01  -68.8839696  91.0031749 1.0000000
## 21-20 -3.564949e+00  -17.9958518  10.8659531 1.0000000
## 22-20  3.152836e+00  -69.9968524  76.3025251 1.0000000
## 23-20  2.806866e+01  -26.7733272  82.9106498 0.9849488
## 27-20 -4.314346e+01 -219.5703366 133.2834168 1.0000000
## 28-20 -2.682767e+01  -49.6607580  -3.9945829 0.0040631
## 29-20  6.856540e+00 -169.5703366 183.2834168 1.0000000
## 30-20 -9.810127e+00 -112.3088589  92.6886058 1.0000000
## 31-20 -3.749521e+00  -37.4104340  29.9113929 1.0000000
## 32-20  5.685654e+01 -119.5703366 233.2834168 0.9999951
## 33-20  1.481109e+01  -48.9235100  78.5456811 1.0000000
## 34-20  5.685654e+01 -119.5703366 233.2834168 0.9999951
## 35-20 -4.314346e+01 -123.0302523  36.7433325 0.9702183
## 38-20 -2.083857e+00  -22.0989197  17.9312052 1.0000000
## 22-21  6.717786e+00  -65.1682374  78.6038089 1.0000000
## 23-21  3.163361e+01  -21.5111639  84.7783852 0.9126717
## 27-21 -3.957851e+01 -215.4852080 136.3281868 1.0000000
## 28-21 -2.326272e+01  -41.6494894  -4.8759528 0.0008921
## 29-21  1.042149e+01 -165.4852080 186.3281868 1.0000000
## 30-21 -6.245177e+00 -107.8459326  95.3555782 1.0000000
## 31-21 -1.845712e-01  -31.0030795  30.6339372 1.0000000
## 32-21  6.042149e+01 -115.4852080 236.3281868 0.9999820
## 33-21  1.837603e+01  -43.9041548  80.6562246 0.9999992
## 34-21  6.042149e+01 -115.4852080 236.3281868 0.9999820
## 35-21 -3.957851e+01 -118.3098446  39.1528235 0.9881783
## 38-21  1.481092e+00  -13.2608918  16.2230759 1.0000000
## 23-22  2.491582e+01  -64.3421892 114.1738390 0.9999998
## 27-22 -4.629630e+01 -236.2589037 143.6663111 1.0000000
## 28-22 -2.998051e+01 -104.0122518  44.0512382 0.9996024
## 29-22  3.703704e+00 -186.2589037 193.6663111 1.0000000
## 30-22 -1.296296e+01 -137.3226812 111.3967553 1.0000000
## 31-22 -6.902357e+00  -84.9562260  71.1515122 1.0000000
## 32-22  5.370370e+01 -136.2589037 243.6663111 0.9999997
## 33-22  1.165825e+01  -83.3230545 106.6395528 1.0000000
## 34-22  5.370370e+01 -136.2589037 243.6663111 0.9999997
## 35-22 -4.629630e+01 -152.7915966  60.1990040 0.9986729
## 38-22 -5.236694e+00  -78.4483874  67.9750001 1.0000000
## 27-23 -7.121212e+01 -254.9035988 112.4793564 0.9998182
## 28-23 -5.489633e+01 -110.9094196   1.1167561 0.0639274
## 29-23 -2.121212e+01 -204.9035988 162.4793564 1.0000000
## 30-23 -3.787879e+01 -152.4305502  76.6729745 0.9999917
## 31-23 -3.181818e+01  -93.0486744  29.4123107 0.9816311
## 32-23  2.878788e+01 -154.9035988 212.4793564 1.0000000
## 33-23 -1.325758e+01  -94.9779208  68.4627693 1.0000000
## 34-23  2.878788e+01 -154.9035988 212.4793564 1.0000000
## 35-23 -7.121212e+01 -166.0699924  23.6457499 0.5203264
## 38-23 -3.015252e+01  -85.0771837  24.7721466 0.9637754
## 28-27  1.631579e+01 -160.4786254 193.1102043 1.0000000
## 29-27  5.000000e+01 -198.7194364 298.7194364 1.0000000
## 30-27  3.333333e+01 -169.7452361 236.4119028 1.0000000
## 31-27  3.939394e+01 -139.1220888 217.9099676 1.0000000
## 32-27  1.000000e+02 -148.7194364 348.7194364 0.9996499
## 33-27  5.795455e+01 -128.5850319 244.4941228 0.9999977
## 34-27  1.000000e+02 -148.7194364 348.7194364 0.9996499
## 35-27  4.147438e-11 -192.6572470 192.6572470 1.0000000
## 38-27  4.105960e+01 -135.3929914 217.5121967 1.0000000
## 29-28  3.368421e+01 -143.1102043 210.4786254 1.0000000
## 30-28  1.701754e+01  -86.1125315 120.1476192 1.0000000
## 31-28  2.307815e+01  -12.4588646  58.6151644 0.8091312
## 32-28  8.368421e+01  -93.1102043 260.4786254 0.9949827
## 33-28  4.163876e+01  -23.1062900 106.3838019 0.8235922
## 34-28  8.368421e+01  -93.1102043 260.4786254 0.9949827
## 35-28 -1.631579e+01  -97.0110304  64.3794514 1.0000000
## 38-28  2.474381e+01    1.7128551  47.7747712 0.0185292
## 30-29 -1.666667e+01 -219.7452361 186.4119028 1.0000000
## 31-29 -1.060606e+01 -189.1220888 167.9099676 1.0000000
## 32-29  5.000000e+01 -198.7194364 298.7194364 1.0000000
## 33-29  7.954545e+00 -178.5850319 194.4941228 1.0000000
## 34-29  5.000000e+01 -198.7194364 298.7194364 1.0000000
## 35-29 -5.000000e+01 -242.6572470 142.6572470 1.0000000
## 38-29 -8.940397e+00 -185.3929914 167.5121967 1.0000000
## 31-30  6.060606e+00  -99.9937180 112.1149301 1.0000000
## 32-30  6.666667e+01 -136.4119028 269.7452361 0.9999928
## 33-30  2.462121e+01  -94.4441532 143.6865775 1.0000000
## 34-30  6.666667e+01 -136.4119028 269.7452361 0.9999928
## 35-30 -3.333333e+01 -161.7714980  95.1048314 1.0000000
## 38-30  7.726269e+00  -94.8167230 110.2692617 1.0000000
## 32-31  6.060606e+01 -117.9099676 239.1220888 0.9999858
## 33-31  1.856061e+01  -50.7476054  87.8688176 0.9999999
## 34-31  6.060606e+01 -117.9099676 239.1220888 0.9999858
## 35-31 -3.939394e+01 -123.7943488  45.0064700 0.9959326
## 38-31  1.665663e+00  -32.1297837  35.4611103 1.0000000
## 33-32 -4.204545e+01 -228.5850319 144.4941228 1.0000000
## 34-32 -1.607248e-11 -248.7194364 248.7194364 1.0000000
## 35-32 -1.000000e+02 -292.6572470  92.6572470 0.9818994
## 38-32 -5.894040e+01 -235.3929914 117.5121967 0.9999897
## 34-33  4.204545e+01 -144.4941228 228.5850319 1.0000000
## 35-33 -5.795455e+01 -158.2165556  42.3074647 0.9354421
## 38-33 -1.689494e+01  -80.7006934  46.9108078 0.9999999
## 35-34 -1.000000e+02 -292.6572470  92.6572470 0.9818994
## 38-34 -5.894040e+01 -235.3929914 117.5121967 0.9999897
## 38-35  4.105960e+01  -38.8839696 121.0031749 0.9842341
# Visualize Variation in FatalityRate by Aircraft Category
ggplot(crash_data, aes(x = AirCraftCategory, y = FatalityRate)) +
  geom_boxplot(fill = "lightblue", alpha = 0.6) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Variation of Fatality Rate by Aircraft Category",
       x = "Aircraft Category", y = "Fatality Rate (%)") +
  theme_minimal()
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Interpretation:

Q31. Does WeatherCondition significantly impact FatalityRate across multiple weather categories?

anova_model_weather <- aov(FatalityRate ~ WeatherCondition, data = crash_data)
anova_results_weather <- summary(anova_model_weather)
print(anova_results_weather)
##                     Df   Sum Sq Mean Sq F value Pr(>F)    
## WeatherCondition     2  2146417 1073209   496.5 <2e-16 ***
## Residuals        20216 43701865    2162                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 24288 observations deleted due to missingness
TukeyHSD(anova_model_weather)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = FatalityRate ~ WeatherCondition, data = crash_data)
## 
## $WeatherCondition
##                   diff       lwr        upr     p adj
## Unknown-IMC  -3.483057 -11.15653   4.190414 0.5365718
## VMC-IMC     -35.079377 -37.80795 -32.350808 0.0000000
## VMC-Unknown -31.596320 -38.85849 -24.334154 0.0000000
# Visualize Variation in FatalityRate by Weather Condition
ggplot(crash_data, aes(x = WeatherCondition, y = FatalityRate)) +
  geom_boxplot(fill = "lightgreen", alpha = 0.6) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Variation of Fatality Rate by Weather Condition",
       x = "Weather Condition", y = "Fatality Rate (%)") +
  theme_minimal()
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Interpretation:

Q32. Does PurposeOfFlight significantly impact FatalityRate across multiple flight purposes?

table(crash_data$PurposeOfFlight)  # Quick overview of categories
## 
##              ,             ,,          ,AOBV           ,BUS          ,EXEC 
##            206              1              2              2              3 
##          ,FERY          ,INST          ,OWRK          ,PERS          ,POSI 
##              2              3              2             14              1 
##          ,PUBF           ,UNK          ,UNK,           AAPL          AAPL, 
##              1              4              1           1869              1 
##      AAPL,AAPL      AAPL,FIRF      AAPL,INST      AAPL,PERS           ADRP 
##             18              1              1              1             12 
##          ADRP,           AOBV          AOBV,      AOBV,AOBV      AOBV,PERS 
##              1            459              1              2              2 
##           ASHO      ASHO,ASHO      ASHO,INST           BANT            BUS 
##            144             21              1            107           1159 
##           BUS,        BUS,BUS       BUS,INST           EXEC          EXEC, 
##              2              7              2            200              2 
##           EXLD           FERY      FERY,PERS           FIRF      FIRF,FIRF 
##            132            226              2             53              1 
##           FLTS          FLTS,      FLTS,FLTS           GLDT      GLDT,GLDT 
##            462              1              1             53              1 
##      GLDT,PERS GLDT,PERS,GLDT           INST          INST,      INST,EXEC 
##              1              1           5176              1              1 
##      INST,GLDT      INST,INST      INST,OWRK      INST,PERS      INST,POSI 
##              1             47              2             38              2 
##      INST,PUBF           OWRK      OWRK,INST      OWRK,OWRK      OWRK,PERS 
##              1            680              2              6              3 
##           PERS          PERS,      PERS,AAPL      PERS,AOBV      PERS,ASHO 
##          30667             12              3              2              1 
##       PERS,BUS      PERS,GLDT      PERS,INST      PERS,OWRK      PERS,PERS 
##              3              2             29              2            165 
##      PERS,POSI      PERS,PUBU      PERS,SKYD       PERS,UNK           POSI 
##              2              1              2              3            955 
##          POSI,      POSI,AOBV       POSI,BUS      POSI,PERS      POSI,POSI 
##              1              1              1              4              5 
##           PUBF           PUBL      PUBL,PUBL           PUBS      PUBS,PERS 
##            109             76              1             67              2 
##      PUBS,PUBS           PUBU          PUBU,      PUBU,INST      PUBU,PUBU 
##              1            238              1              1              2 
##           SKYD      SKYD,PERS      SKYD,SKYD            UNK           UNK, 
##            156              1              1            821              3 
##       UNK,INST       UNK,PERS       UNK,POSI        UNK,UNK 
##              2              4              1             10
sort(table(crash_data$PurposeOfFlight), decreasing = TRUE)  # Sorted by frequency
## 
##           PERS           INST           AAPL            BUS           POSI 
##          30667           5176           1869           1159            955 
##            UNK           OWRK           FLTS           AOBV           PUBU 
##            821            680            462            459            238 
##           FERY              ,           EXEC      PERS,PERS           SKYD 
##            226            206            200            165            156 
##           ASHO           EXLD           PUBF           BANT           PUBL 
##            144            132            109            107             76 
##           PUBS           FIRF           GLDT      INST,INST      INST,PERS 
##             67             53             53             47             38 
##      PERS,INST      ASHO,ASHO      AAPL,AAPL          ,PERS           ADRP 
##             29             21             18             14             12 
##          PERS,        UNK,UNK        BUS,BUS      OWRK,OWRK      POSI,POSI 
##             12             10              7              6              5 
##           ,UNK      POSI,PERS       UNK,PERS          ,EXEC          ,INST 
##              4              4              4              3              3 
##      OWRK,PERS      PERS,AAPL       PERS,BUS       PERS,UNK           UNK, 
##              3              3              3              3              3 
##          ,AOBV           ,BUS          ,FERY          ,OWRK      AOBV,AOBV 
##              2              2              2              2              2 
##      AOBV,PERS           BUS,       BUS,INST          EXEC,      FERY,PERS 
##              2              2              2              2              2 
##      INST,OWRK      INST,POSI      OWRK,INST      PERS,AOBV      PERS,GLDT 
##              2              2              2              2              2 
##      PERS,OWRK      PERS,POSI      PERS,SKYD      PUBS,PERS      PUBU,PUBU 
##              2              2              2              2              2 
##       UNK,INST             ,,          ,POSI          ,PUBF          ,UNK, 
##              2              1              1              1              1 
##          AAPL,      AAPL,FIRF      AAPL,INST      AAPL,PERS          ADRP, 
##              1              1              1              1              1 
##          AOBV,      ASHO,INST      FIRF,FIRF          FLTS,      FLTS,FLTS 
##              1              1              1              1              1 
##      GLDT,GLDT      GLDT,PERS GLDT,PERS,GLDT          INST,      INST,EXEC 
##              1              1              1              1              1 
##      INST,GLDT      INST,PUBF      PERS,ASHO      PERS,PUBU          POSI, 
##              1              1              1              1              1 
##      POSI,AOBV       POSI,BUS      PUBL,PUBL      PUBS,PUBS          PUBU, 
##              1              1              1              1              1 
##      PUBU,INST      SKYD,PERS      SKYD,SKYD       UNK,POSI 
##              1              1              1              1
crash_data <- crash_data %>%
  mutate(PurposeOfFlight_Clean = case_when(
    str_detect(PurposeOfFlight, "PERS") ~ "Personal",
    str_detect(PurposeOfFlight, "BUS") ~ "Business",
    str_detect(PurposeOfFlight, "INST") ~ "Instructional",
    str_detect(PurposeOfFlight, "POSI") ~ "Positioning",
    str_detect(PurposeOfFlight, "FERY") ~ "Ferry",
    str_detect(PurposeOfFlight, "AOBV|ASHO|ADRP|GLDT") ~ "Other",
    str_detect(PurposeOfFlight, "MIL") ~ "Military",
    str_detect(PurposeOfFlight, "PUBF|PUBL|PUBS|PUBU") ~ "Public Service",
    str_detect(PurposeOfFlight, "SKYD") ~ "Skydiving",
    TRUE ~ "Unknown"
  ))
crash_data$PurposeOfFlight_Clean <- as.factor(crash_data$PurposeOfFlight_Clean)
anova_model_purpose <- aov(FatalityRate ~ PurposeOfFlight_Clean, data = crash_data)
anova_results_purpose <- summary(anova_model_purpose)
print(anova_results_purpose)
##                          Df   Sum Sq Mean Sq F value Pr(>F)    
## PurposeOfFlight_Clean     8   347833   43479   19.31 <2e-16 ***
## Residuals             20210 45500449    2251                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 24288 observations deleted due to missingness
TukeyHSD(anova_model_purpose)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = FatalityRate ~ PurposeOfFlight_Clean, data = crash_data)
## 
## $PurposeOfFlight_Clean
##                                     diff         lwr          upr     p adj
## Ferry-Business                -1.5793786 -17.1949411  14.03618395 0.9999973
## Instructional-Business       -19.9410546 -27.2041998 -12.67790931 0.0000000
## Other-Business                -6.7800366 -16.0892683   2.52919506 0.3672720
## Personal-Business             -6.6757237 -13.0757403  -0.27570716 0.0332034
## Positioning-Business          -0.3883593  -9.8919435   9.11522486 1.0000000
## Public Service-Business      -16.0551990 -27.4451747  -4.66522332 0.0004203
## Skydiving-Business           -19.6604051 -37.3719397  -1.94887044 0.0167802
## Unknown-Business              -7.0995880 -14.1003153  -0.09886065 0.0438358
## Instructional-Ferry          -18.3616760 -33.1154869  -3.60786503 0.0036258
## Other-Ferry                   -5.2006581 -21.0620405  10.66072439 0.9843777
## Personal-Ferry                -5.0963452 -19.4449294   9.25223912 0.9741372
## Positioning-Ferry              1.1910193 -14.7852059  17.16724444 0.9999998
## Public Service-Ferry         -14.4758204 -31.6412859   2.68964504 0.1797888
## Skydiving-Ferry              -18.0810265 -39.9584148   3.79636178 0.2020961
## Unknown-Ferry                 -5.5202094 -20.1466185   9.10619965 0.9626115
## Other-Instructional           13.1610179   5.3834258  20.93861004 0.0000055
## Personal-Instructional        13.2653308   9.4196376  17.11102408 0.0000000
## Positioning-Instructional     19.5526953  11.5434970  27.56189348 0.0000000
## Public Service-Instructional   3.8858556  -6.2906218  14.06233287 0.9599260
## Skydiving-Instructional        0.2806495 -16.6759894  17.23728841 1.0000000
## Unknown-Instructional         12.8414666   8.0624157  17.62051748 0.0000000
## Personal-Other                 0.1043129  -6.8740732   7.08269900 1.0000000
## Positioning-Other              6.3916773  -3.5106341  16.29398880 0.5416991
## Public Service-Other          -9.2751624 -20.9998887   2.44956392 0.2549118
## Skydiving-Other              -12.8803684 -30.8090081   5.04827121 0.3868814
## Unknown-Other                 -0.3195513  -7.8526678   7.21356511 1.0000000
## Positioning-Personal           6.2873644  -0.9482551  13.52298394 0.1492801
## Public Service-Personal       -9.3794753 -18.9590172   0.20006668 0.0604520
## Skydiving-Personal           -12.9846813 -29.5899376   3.62057497 0.2697985
## Unknown-Personal              -0.4238642  -3.7474558   2.89972733 0.9999837
## Public Service-Positioning   -15.6668397 -27.5464661  -3.78721331 0.0014258
## Skydiving-Positioning        -19.2720458 -37.3023657  -1.24172586 0.0256961
## Unknown-Positioning           -6.7112287 -14.4832400   1.06078266 0.1554044
## Skydiving-Public Service      -3.6052061 -22.6972429  15.48683078 0.9996760
## Unknown-Public Service         8.9556110  -1.0352645  18.94648661 0.1210771
## Unknown-Skydiving             12.5608171  -4.2850877  29.40672187 0.3340770
# Visualize Variation in FatalityRate by Purpose of Flight
ggplot(crash_data, aes(x = PurposeOfFlight_Clean, y = FatalityRate)) +
  geom_boxplot(fill = "lightcoral", alpha = 0.6) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Variation of Fatality Rate by Purpose of Flight",
       x = "Purpose of Flight", y = "Fatality Rate (%)") +
  theme_minimal()
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Interpretation:

Q33. Is there a progressive increase in FatalityRate across IncidentSeverity levels?

crash_data$IncidentSeverity <- as.factor(crash_data$IncidentSeverity)
anova_model_severity <- aov(FatalityRate ~ IncidentSeverity, data = crash_data)
anova_results_severity <- summary(anova_model_severity)
print(anova_results_severity)
##                     Df   Sum Sq  Mean Sq F value Pr(>F)    
## IncidentSeverity     2 42220284 21110142  117630 <2e-16 ***
## Residuals        20216  3627998      179                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 24288 observations deleted due to missingness
TukeyHSD(anova_model_severity)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = FatalityRate ~ IncidentSeverity, data = crash_data)
## 
## $IncidentSeverity
##                               diff         lwr         upr p adj
## Minor-Catastrophic   -9.172854e+01 -92.2463829 -91.2106938     0
## Serious-Catastrophic -9.172854e+01 -92.2844971 -91.1725796     0
## Serious-Minor         1.738601e-11  -0.6032965   0.6032965     1
# Visualize Variation in FatalityRate by Incident Severity
ggplot(crash_data, aes(x = IncidentSeverity, y = FatalityRate)) +
  geom_boxplot(fill = "lightyellow", alpha = 0.6) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Variation of Fatality Rate by Incident Severity",
       x = "Incident Severity", y = "Fatality Rate (%)") +
  theme_minimal()
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Interpretation:

Q34. Does the severity level of AirCraftDamage correlate with higher FatalityRates?

crash_data$AirCraftDamage <- as.factor(crash_data$AirCraftDamage)
anova_model_damage <- aov(FatalityRate ~ AirCraftDamage, data = crash_data)
anova_results_damage <- summary(anova_model_damage)
print(anova_results_damage)
##                   Df   Sum Sq Mean Sq F value Pr(>F)    
## AirCraftDamage    19 12612912  663837   403.5 <2e-16 ***
## Residuals      20199 33235370    1645                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 24288 observations deleted due to missingness
TukeyHSD(anova_model_damage)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = FatalityRate ~ AirCraftDamage, data = crash_data)
## 
## $AirCraftDamage
##                                                               diff          lwr
## Destroyed-,                                          -1.914928e+01 -102.1760770
## Destroyed,Destroyed-,                                -1.021324e+01  -95.1711941
## Destroyed,Minor-,                                    -1.848406e-10 -117.3862779
## Destroyed,None-,                                     -5.000000e+01 -216.0092663
## Destroyed,Substantial-,                              -1.968391e+01 -106.8762463
## Minor-,                                              -8.666940e+01 -170.1933535
## Minor,-,                                             -1.104610e-10 -166.0092663
## Minor,Destroyed-,                                    -3.333333e+01 -150.7196112
## Minor,Substantial-,                                  -7.142857e+01 -170.6380836
## None-,                                               -9.209115e+01 -175.2625179
## None,None-,                                          -1.410427e-10 -166.0092663
## Substantial-,                                        -7.251575e+01 -155.5297254
## Substantial,Destroyed-,                              -2.705882e+01 -117.0899889
## Substantial,Minor-,                                  -5.769231e+01 -149.7776803
## Substantial,None-,                                   -7.500000e+01 -184.8048085
## Substantial,Substantial-,                            -5.698148e+01 -141.3581850
## Substantial,Substantial,None-,                       -1.914628e-10 -166.0092663
## Unknown-,                                            -3.691358e+01 -122.1927340
## Unknown,Unknown-,                                    -1.916618e-10 -166.0092663
## Destroyed,Destroyed-Destroyed                         8.936033e+00   -9.2783752
## Destroyed,Minor-Destroyed                             1.914928e+01  -63.8775234
## Destroyed,None-Destroyed                             -3.085072e+01 -174.6317643
## Destroyed,Substantial-Destroyed                      -5.346312e-01  -27.3005642
## Minor-Destroyed                                      -6.752012e+01  -77.0155328
## Minor,-Destroyed                                      1.914928e+01 -124.6317643
## Minor,Destroyed-Destroyed                            -1.418406e+01  -97.2108567
## Minor,Substantial-Destroyed                          -5.227929e+01 -106.6524371
## None-Destroyed                                       -7.294188e+01  -78.5443111
## None,None-Destroyed                                   1.914928e+01 -124.6317643
## Substantial-Destroyed                                -5.336647e+01  -55.6536917
## Substantial,Destroyed-Destroyed                      -7.909547e+00  -42.8312025
## Substantial,Minor-Destroyed                          -3.854303e+01  -78.4632908
## Substantial,None-Destroyed                           -5.585072e+01 -127.7604393
## Substantial,Substantial-Destroyed                    -3.783220e+01  -53.1076557
## Substantial,Substantial,None-Destroyed                1.914928e+01 -124.6317643
## Unknown-Destroyed                                    -1.776430e+01  -37.4225176
## Unknown,Unknown-Destroyed                             1.914928e+01 -124.6317643
## Destroyed,Minor-Destroyed,Destroyed                   1.021324e+01  -74.7447070
## Destroyed,None-Destroyed,Destroyed                   -3.978676e+01 -184.6915238
## Destroyed,Substantial-Destroyed,Destroyed            -9.470664e+00  -41.7323907
## Minor-Destroyed,Destroyed                            -7.645615e+01  -96.8170630
## Minor,-Destroyed,Destroyed                            1.021324e+01 -134.6915238
## Minor,Destroyed-Destroyed,Destroyed                  -2.312009e+01 -108.0780404
## Minor,Substantial-Destroyed,Destroyed                -6.121533e+01 -118.4939665
## None-Destroyed,Destroyed                             -8.187791e+01 -100.7403346
## None,None-Destroyed,Destroyed                         1.021324e+01 -134.6915238
## Substantial-Destroyed,Destroyed                      -6.230251e+01  -80.4583647
## Substantial,Destroyed-Destroyed,Destroyed            -1.684558e+01  -56.1384019
## Substantial,Minor-Destroyed,Destroyed                -4.747906e+01  -91.2743945
## Substantial,None-Destroyed,Destroyed                 -6.478676e+01 -138.9177964
## Substantial,Substantial-Destroyed,Destroyed          -4.676824e+01  -70.3848256
## Substantial,Substantial,None-Destroyed,Destroyed      1.021324e+01 -134.6915238
## Unknown-Destroyed,Destroyed                          -2.670034e+01  -53.3620920
## Unknown,Unknown-Destroyed,Destroyed                   1.021324e+01 -134.6915238
## Destroyed,None-Destroyed,Minor                       -5.000000e+01 -216.0092663
## Destroyed,Substantial-Destroyed,Minor                -1.968391e+01 -106.8762463
## Minor-Destroyed,Minor                                -8.666940e+01 -170.1933535
## Minor,-Destroyed,Minor                                7.437961e-11 -166.0092663
## Minor,Destroyed-Destroyed,Minor                      -3.333333e+01 -150.7196112
## Minor,Substantial-Destroyed,Minor                    -7.142857e+01 -170.6380836
## None-Destroyed,Minor                                 -9.209115e+01 -175.2625179
## None,None-Destroyed,Minor                             4.379785e-11 -166.0092663
## Substantial-Destroyed,Minor                          -7.251575e+01 -155.5297254
## Substantial,Destroyed-Destroyed,Minor                -2.705882e+01 -117.0899889
## Substantial,Minor-Destroyed,Minor                    -5.769231e+01 -149.7776803
## Substantial,None-Destroyed,Minor                     -7.500000e+01 -184.8048085
## Substantial,Substantial-Destroyed,Minor              -5.698148e+01 -141.3581850
## Substantial,Substantial,None-Destroyed,Minor         -6.622258e-12 -166.0092663
## Unknown-Destroyed,Minor                              -3.691358e+01 -122.1927340
## Unknown,Unknown-Destroyed,Minor                      -6.821210e-12 -166.0092663
## Destroyed,Substantial-Destroyed,None                  3.031609e+01 -115.9099047
## Minor-Destroyed,None                                 -3.666940e+01 -180.7380937
## Minor,-Destroyed,None                                 5.000000e+01 -153.3189974
## Minor,Destroyed-Destroyed,None                        1.666667e+01 -149.3425996
## Minor,Substantial-Destroyed,None                     -2.142857e+01 -175.1232869
## None-Destroyed,None                                  -4.209115e+01 -185.9557218
## None,None-Destroyed,None                              5.000000e+01 -153.3189974
## Substantial-Destroyed,None                           -2.251575e+01 -166.2893859
## Substantial,Destroyed-Destroyed,None                  2.294118e+01 -124.9951239
## Substantial,Minor-Destroyed,None                     -7.692308e+00 -156.8876631
## Substantial,None-Destroyed,None                      -2.500000e+01 -185.7377809
## Substantial,Substantial-Destroyed,None               -6.981481e+00 -151.5462294
## Substantial,Substantial,None-Destroyed,None           5.000000e+01 -153.3189974
## Unknown-Destroyed,None                                1.308642e+01 -132.0069030
## Unknown,Unknown-Destroyed,None                        5.000000e+01 -153.3189974
## Minor-Destroyed,Substantial                          -6.698549e+01  -95.2559171
## Minor,-Destroyed,Substantial                          1.968391e+01 -126.5420886
## Minor,Destroyed-Destroyed,Substantial                -1.364943e+01 -100.8417636
## Minor,Substantial-Destroyed,Substantial              -5.174466e+01 -112.2879779
## None-Destroyed,Substantial                           -7.240724e+01  -99.6183010
## None,None-Destroyed,Substantial                       1.968391e+01 -126.5420886
## Substantial-Destroyed,Substantial                    -5.283184e+01  -79.5579657
## Substantial,Destroyed-Destroyed,Substantial          -7.374915e+00  -51.2904748
## Substantial,Minor-Destroyed,Substantial              -3.800840e+01  -85.9946629
## Substantial,None-Destroyed,Substantial               -5.531609e+01 -131.9976515
## Substantial,Substantial-Destroyed,Substantial        -3.729757e+01  -67.9960051
## Substantial,Substantial,None-Destroyed,Substantial    1.968391e+01 -126.5420886
## Unknown-Destroyed,Substantial                        -1.722967e+01  -50.3280058
## Unknown,Unknown-Destroyed,Substantial                 1.968391e+01 -126.5420886
## Minor,-Minor                                          8.666940e+01  -57.3993028
## Minor,Destroyed-Minor                                 5.333606e+01  -30.1878960
## Minor,Substantial-Minor                               1.524082e+01  -39.8884845
## None-Minor                                           -5.421757e+00  -16.1076969
## None,None-Minor                                       8.666940e+01  -57.3993028
## Substantial-Minor                                     1.415365e+01    4.7710340
## Substantial,Destroyed-Minor                           5.961057e+01   23.5228445
## Substantial,Minor-Minor                               2.897709e+01  -11.9671326
## Substantial,None-Minor                                1.166940e+01  -60.8137702
## Substantial,Substantial-Minor                         2.968791e+01   11.9075476
## Substantial,Substantial,None-Minor                    8.666940e+01  -57.3993028
## Unknown-Minor                                         4.975582e+01   28.0936960
## Unknown,Unknown-Minor                                 8.666940e+01  -57.3993028
## Minor,Destroyed-Minor,                               -3.333333e+01 -199.3425996
## Minor,Substantial-Minor,                             -7.142857e+01 -225.1232869
## None-Minor,                                          -9.209115e+01 -235.9557218
## None,None-Minor,                                     -3.058176e-11 -203.3189974
## Substantial-Minor,                                   -7.251575e+01 -216.2893859
## Substantial,Destroyed-Minor,                         -2.705882e+01 -174.9951239
## Substantial,Minor-Minor,                             -5.769231e+01 -206.8876631
## Substantial,None-Minor,                              -7.500000e+01 -235.7377809
## Substantial,Substantial-Minor,                       -5.698148e+01 -201.5462294
## Substantial,Substantial,None-Minor,                  -8.100187e-11 -203.3189974
## Unknown-Minor,                                       -3.691358e+01 -182.0069030
## Unknown,Unknown-Minor,                               -8.120082e-11 -203.3189974
## Minor,Substantial-Minor,Destroyed                    -3.809524e+01 -137.3047503
## None-Minor,Destroyed                                 -5.875782e+01 -141.9291845
## None,None-Minor,Destroyed                             3.333333e+01 -132.6759329
## Substantial-Minor,Destroyed                          -3.918242e+01 -122.1963920
## Substantial,Destroyed-Minor,Destroyed                 6.274510e+00  -83.7566555
## Substantial,Minor-Minor,Destroyed                    -2.435897e+01 -116.4443469
## Substantial,None-Minor,Destroyed                     -4.166667e+01 -151.4714751
## Substantial,Substantial-Minor,Destroyed              -2.364815e+01 -108.0248516
## Substantial,Substantial,None-Minor,Destroyed          3.333333e+01 -132.6759329
## Unknown-Minor,Destroyed                              -3.580247e+00  -88.8594007
## Unknown,Unknown-Minor,Destroyed                       3.333333e+01 -132.6759329
## None-Minor,Substantial                               -2.066258e+01  -75.2562169
## None,None-Minor,Substantial                           7.142857e+01  -82.2661440
## Substantial-Minor,Substantial                        -1.087179e+00  -55.4407356
## Substantial,Destroyed-Minor,Substantial               4.436975e+01  -20.1949468
## Substantial,Minor-Minor,Substantial                   1.373626e+01  -53.6633276
## Substantial,None-Minor,Substantial                   -3.571429e+00  -93.6829430
## Substantial,Substantial-Minor,Substantial             1.444709e+01  -41.9658267
## Substantial,Substantial,None-Minor,Substantial        7.142857e+01  -82.2661440
## Unknown-Minor,Substantial                             3.451499e+01  -23.2389970
## Unknown,Unknown-Minor,Substantial                     7.142857e+01  -82.2661440
## None,None-None                                        9.209115e+01  -51.7734162
## Substantial-None                                      1.957540e+01   14.1663563
## Substantial,Destroyed-None                            6.503233e+01   29.7683469
## Substantial,Minor-None                                3.439885e+01   -5.8212191
## Substantial,None-None                                 1.709115e+01  -54.9854293
## Substantial,Substantial-None                          3.510967e+01   19.0670463
## Substantial,Substantial,None-None                     9.209115e+01  -51.7734162
## Unknown-None                                          5.517757e+01   34.9174690
## Unknown,Unknown-None                                  9.209115e+01  -51.7734162
## Substantial-None,None                                -7.251575e+01 -216.2893859
## Substantial,Destroyed-None,None                      -2.705882e+01 -174.9951239
## Substantial,Minor-None,None                          -5.769231e+01 -206.8876631
## Substantial,None-None,None                           -7.500000e+01 -235.7377809
## Substantial,Substantial-None,None                    -5.698148e+01 -201.5462294
## Substantial,Substantial,None-None,None               -5.042011e-11 -203.3189974
## Unknown-None,None                                    -3.691358e+01 -182.0069030
## Unknown,Unknown-None,None                            -5.061906e-11 -203.3189974
## Substantial,Destroyed-Substantial                     4.545693e+01   10.5657740
## Substantial,Minor-Substantial                         1.482344e+01  -25.0701365
## Substantial,None-Substantial                         -2.484250e+00  -74.3791575
## Substantial,Substantial-Substantial                   1.553427e+01    0.3286809
## Substantial,Substantial,None-Substantial              7.251575e+01  -71.2578853
## Unknown-Substantial                                   3.560217e+01   15.9981938
## Unknown,Unknown-Substantial                           7.251575e+01  -71.2578853
## Substantial,Minor-Substantial,Destroyed              -3.063348e+01  -83.6031767
## Substantial,None-Substantial,Destroyed               -4.794118e+01 -127.8359100
## Substantial,Substantial-Substantial,Destroyed        -2.992266e+01  -67.9423973
## Substantial,Substantial,None-Substantial,Destroyed    2.705882e+01 -120.8774769
## Unknown-Substantial,Destroyed                        -9.854757e+00  -49.8373349
## Unknown,Unknown-Substantial,Destroyed                 2.705882e+01 -120.8774769
## Substantial,None-Substantial,Minor                   -1.730769e+01  -99.5103295
## Substantial,Substantial-Substantial,Minor             7.108262e-01  -41.9460102
## Substantial,Substantial,None-Substantial,Minor        5.769231e+01  -91.5030477
## Unknown-Substantial,Minor                             2.077873e+01  -23.6364915
## Unknown,Unknown-Substantial,Minor                     5.769231e+01  -91.5030477
## Substantial,Substantial-Substantial,None              1.801852e+01  -55.4456619
## Substantial,Substantial,None-Substantial,None         7.500000e+01  -85.7377809
## Unknown-Substantial,None                              3.808642e+01  -36.4125184
## Unknown,Unknown-Substantial,None                      7.500000e+01  -85.7377809
## Substantial,Substantial,None-Substantial,Substantial  5.698148e+01  -87.5832664
## Unknown-Substantial,Substantial                       2.006790e+01   -4.6792990
## Unknown,Unknown-Substantial,Substantial               5.698148e+01  -87.5832664
## Unknown-Substantial,Substantial,None                 -3.691358e+01 -182.0069030
## Unknown,Unknown-Substantial,Substantial,None         -1.989520e-13 -203.3189974
## Unknown,Unknown-Unknown                               3.691358e+01 -108.1797425
##                                                               upr     p adj
## Destroyed-,                                           63.87752339 0.9999994
## Destroyed,Destroyed-,                                 74.74470702 1.0000000
## Destroyed,Minor-,                                    117.38627791 1.0000000
## Destroyed,None-,                                     116.00926625 0.9999567
## Destroyed,Substantial-,                               67.50843025 0.9999996
## Minor-,                                               -3.14543732 0.0319149
## Minor,-,                                             166.00926625 1.0000000
## Minor,Destroyed-,                                     84.05294457 0.9999826
## Minor,Substantial-,                                   27.78094079 0.5429617
## None-,                                                -8.91978775 0.0130061
## None,None-,                                          166.00926625 1.0000000
## Substantial-,                                         10.49822475 0.1833122
## Substantial,Destroyed-,                               62.97234180 0.9999581
## Substantial,Minor-,                                   34.39306487 0.7880275
## Substantial,None-,                                    34.80480846 0.6455960
## Substantial,Substantial-,                             27.39522200 0.6664419
## Substantial,Substantial,None-,                       166.00926625 1.0000000
## Unknown-,                                             48.36557354 0.9935625
## Unknown,Unknown-,                                    166.00926625 1.0000000
## Destroyed,Destroyed-Destroyed                         27.15044174 0.9738704
## Destroyed,Minor-Destroyed                            102.17607702 0.9999994
## Destroyed,None-Destroyed                             112.93031796 0.9999998
## Destroyed,Substantial-Destroyed                       26.23130176 1.0000000
## Minor-Destroyed                                      -58.02470446 0.0000000
## Minor,-Destroyed                                     162.93031796 1.0000000
## Minor,Destroyed-Destroyed                             68.84274369 1.0000000
## Minor,Substantial-Destroyed                            2.09384790 0.0769184
## None-Destroyed                                       -67.33944094 0.0000000
## None,None-Destroyed                                  162.93031796 1.0000000
## Substantial-Destroyed                                -51.07925532 0.0000000
## Substantial,Destroyed-Destroyed                       27.01210906 0.9999996
## Substantial,Minor-Destroyed                            1.37722905 0.0736466
## Substantial,None-Destroyed                            16.05899294 0.3891094
## Substantial,Substantial-Destroyed                    -22.55675368 0.0000000
## Substantial,Substantial,None-Destroyed               162.93031796 1.0000000
## Unknown-Destroyed                                      1.89391071 0.1387390
## Unknown,Unknown-Destroyed                            162.93031796 1.0000000
## Destroyed,Minor-Destroyed,Destroyed                   95.17119411 1.0000000
## Destroyed,None-Destroyed,Destroyed                   105.11801091 0.9999898
## Destroyed,Substantial-Destroyed,Destroyed             22.79106175 0.9999708
## Minor-Destroyed,Destroyed                            -56.09524077 0.0000000
## Minor,-Destroyed,Destroyed                           155.11801091 1.0000000
## Minor,Destroyed-Destroyed,Destroyed                   61.83786078 0.9999911
## Minor,Substantial-Destroyed,Destroyed                 -3.93668930 0.0216047
## None-Destroyed,Destroyed                             -63.01548392 0.0000000
## None,None-Destroyed,Destroyed                        155.11801091 1.0000000
## Substantial-Destroyed,Destroyed                      -44.14664879 0.0000000
## Substantial,Destroyed-Destroyed,Destroyed             22.44724192 0.9942645
## Substantial,Minor-Destroyed,Destroyed                 -3.68373376 0.0176958
## Substantial,None-Destroyed,Destroyed                   9.34428350 0.1826393
## Substantial,Substantial-Destroyed,Destroyed          -23.15165024 0.0000000
## Substantial,Substantial,None-Destroyed,Destroyed     155.11801091 1.0000000
## Unknown-Destroyed,Destroyed                           -0.03858141 0.0491693
## Unknown,Unknown-Destroyed,Destroyed                  155.11801091 1.0000000
## Destroyed,None-Destroyed,Minor                       116.00926625 0.9999567
## Destroyed,Substantial-Destroyed,Minor                 67.50843025 0.9999996
## Minor-Destroyed,Minor                                 -3.14543732 0.0319149
## Minor,-Destroyed,Minor                               166.00926625 1.0000000
## Minor,Destroyed-Destroyed,Minor                       84.05294457 0.9999826
## Minor,Substantial-Destroyed,Minor                     27.78094079 0.5429617
## None-Destroyed,Minor                                  -8.91978775 0.0130061
## None,None-Destroyed,Minor                            166.00926625 1.0000000
## Substantial-Destroyed,Minor                           10.49822475 0.1833122
## Substantial,Destroyed-Destroyed,Minor                 62.97234180 0.9999581
## Substantial,Minor-Destroyed,Minor                     34.39306487 0.7880275
## Substantial,None-Destroyed,Minor                      34.80480846 0.6455960
## Substantial,Substantial-Destroyed,Minor               27.39522200 0.6664419
## Substantial,Substantial,None-Destroyed,Minor         166.00926625 1.0000000
## Unknown-Destroyed,Minor                               48.36557354 0.9935625
## Unknown,Unknown-Destroyed,Minor                      166.00926625 1.0000000
## Destroyed,Substantial-Destroyed,None                 176.54208861 0.9999999
## Minor-Destroyed,None                                 107.39930283 0.9999970
## Minor,-Destroyed,None                                253.31899744 0.9999983
## Minor,Destroyed-Destroyed,None                       182.67593292 1.0000000
## Minor,Substantial-Destroyed,None                     132.26614402 1.0000000
## None-Destroyed,None                                  101.77341616 0.9999723
## None,None-Destroyed,None                             253.31899744 0.9999983
## Substantial-Destroyed,None                           121.25788530 1.0000000
## Substantial,Destroyed-Destroyed,None                 170.87747685 1.0000000
## Substantial,Minor-Destroyed,None                     141.50304773 1.0000000
## Substantial,None-Destroyed,None                      135.73778088 1.0000000
## Substantial,Substantial-Destroyed,None               137.58326641 1.0000000
## Substantial,Substantial,None-Destroyed,None          253.31899744 0.9999983
## Unknown-Destroyed,None                               158.17974252 1.0000000
## Unknown,Unknown-Destroyed,None                       253.31899744 0.9999983
## Minor-Destroyed,Substantial                          -38.71505770 0.0000000
## Minor,-Destroyed,Substantial                         165.90990470 1.0000000
## Minor,Destroyed-Destroyed,Substantial                 73.54291300 1.0000000
## Minor,Substantial-Destroyed,Substantial                8.79865112 0.2159906
## None-Destroyed,Substantial                           -45.19618851 0.0000000
## None,None-Destroyed,Substantial                      165.90990470 1.0000000
## Substantial-Destroyed,Substantial                    -26.10571888 0.0000000
## Substantial,Destroyed-Destroyed,Substantial           36.54064379 1.0000000
## Substantial,Minor-Destroyed,Substantial                9.97786356 0.3505330
## Substantial,None-Destroyed,Substantial                21.36546761 0.5390517
## Substantial,Substantial-Destroyed,Substantial         -6.59914176 0.0027581
## Substantial,Substantial,None-Destroyed,Substantial   165.90990470 1.0000000
## Unknown-Destroyed,Substantial                         15.86866141 0.9528713
## Unknown,Unknown-Destroyed,Substantial                165.90990470 1.0000000
## Minor,-Minor                                         230.73809369 0.8403321
## Minor,Destroyed-Minor                                136.86002020 0.7600646
## Minor,Substantial-Minor                               70.37013247 0.9999886
## None-Minor                                             5.26418216 0.9632678
## None,None-Minor                                      230.73809369 0.8403321
## Substantial-Minor                                     23.53625629 0.0000168
## Substantial,Destroyed-Minor                           95.69829927 0.0000009
## Substantial,Minor-Minor                               69.92130806 0.5772696
## Substantial,None-Minor                                84.15256104 1.0000000
## Substantial,Substantial-Minor                         47.46828032 0.0000006
## Substantial,Substantial,None-Minor                   230.73809369 0.8403321
## Unknown-Minor                                         71.41793439 0.0000000
## Unknown,Unknown-Minor                                230.73809369 0.8403321
## Minor,Destroyed-Minor,                               132.67593292 0.9999999
## Minor,Substantial-Minor,                              82.26614402 0.9853855
## None-Minor,                                           51.77341616 0.7563539
## None,None-Minor,                                     203.31899744 1.0000000
## Substantial-Minor,                                    71.25788530 0.9653692
## Substantial,Destroyed-Minor,                         120.87747685 1.0000000
## Substantial,Minor-Minor,                              91.50304773 0.9984463
## Substantial,None-Minor,                               85.73778088 0.9847270
## Substantial,Substantial-Minor,                        87.58326641 0.9980034
## Substantial,Substantial,None-Minor,                  203.31899744 1.0000000
## Unknown-Minor,                                       108.17974252 0.9999970
## Unknown,Unknown-Minor,                               203.31899744 1.0000000
## Minor,Substantial-Minor,Destroyed                     61.11427412 0.9985840
## None-Minor,Destroyed                                  24.41354558 0.5807751
## None,None-Minor,Destroyed                            199.34259958 0.9999999
## Substantial-Minor,Destroyed                           43.83155808 0.9826741
## Substantial,Destroyed-Minor,Destroyed                 96.30567513 1.0000000
## Substantial,Minor-Minor,Destroyed                     67.72639821 0.9999944
## Substantial,None-Minor,Destroyed                      68.13814179 0.9987912
## Substantial,Substantial-Minor,Destroyed               60.72855534 0.9999859
## Substantial,Substantial,None-Minor,Destroyed         199.34259958 0.9999999
## Unknown-Minor,Destroyed                               81.69890688 1.0000000
## Unknown,Unknown-Minor,Destroyed                      199.34259958 0.9999999
## None-Minor,Substantial                                33.93105415 0.9988324
## None,None-Minor,Substantial                          225.12328687 0.9853855
## Substantial-Minor,Substantial                         53.26637785 1.0000000
## Substantial,Destroyed-Minor,Substantial              108.93444262 0.6341606
## Substantial,Minor-Minor,Substantial                   81.13585509 0.9999999
## Substantial,None-Minor,Substantial                    86.54008587 1.0000000
## Substantial,Substantial-Minor,Substantial             70.86000660 0.9999967
## Substantial,Substantial,None-Minor,Substantial       225.12328687 0.9853855
## Unknown-Minor,Substantial                             92.26897932 0.8479123
## Unknown,Unknown-Minor,Substantial                    225.12328687 0.9853855
## None,None-None                                       235.95572179 0.7563539
## Substantial-None                                      24.98444873 0.0000000
## Substantial,Destroyed-None                           100.29631170 0.0000000
## Substantial,Minor-None                                74.61890935 0.2149047
## Substantial,None-None                                 89.16773491 0.9999991
## Substantial,Substantial-None                          51.15229634 0.0000000
## Substantial,Substantial,None-None                    235.95572179 0.7563539
## Unknown-None                                          75.43767616 0.0000000
## Unknown,Unknown-None                                 235.95572179 0.7563539
## Substantial-None,None                                 71.25788530 0.9653692
## Substantial,Destroyed-None,None                      120.87747685 1.0000000
## Substantial,Minor-None,None                           91.50304773 0.9984463
## Substantial,None-None,None                            85.73778088 0.9847270
## Substantial,Substantial-None,None                     87.58326641 0.9980034
## Substantial,Substantial,None-None,None               203.31899744 1.0000000
## Unknown-None,None                                    108.17974252 0.9999970
## Unknown,Unknown-None,None                            203.31899744 1.0000000
## Substantial,Destroyed-Substantial                     80.34807959 0.0006811
## Substantial,Minor-Substantial                         54.71702173 0.9990896
## Substantial,None-Substantial                          69.41065816 1.0000000
## Substantial,Substantial-Substantial                   30.73985680 0.0387683
## Substantial,Substantial,None-Substantial             216.28938592 0.9653692
## Unknown-Substantial                                   55.20614634 0.0000000
## Unknown,Unknown-Substantial                          216.28938592 0.9653692
## Substantial,Minor-Substantial,Destroyed               22.33620839 0.8817763
## Substantial,None-Substantial,Destroyed                31.95355708 0.8432826
## Substantial,Substantial-Substantial,Destroyed          8.09708140 0.3629578
## Substantial,Substantial,None-Substantial,Destroyed   174.99512391 1.0000000
## Unknown-Substantial,Destroyed                         30.12782150 0.9999982
## Unknown,Unknown-Substantial,Destroyed                174.99512391 1.0000000
## Substantial,None-Substantial,Minor                    64.89494488 0.9999999
## Substantial,Substantial-Substantial,Minor             43.36766260 1.0000000
## Substantial,Substantial,None-Substantial,Minor       206.88766312 0.9984463
## Unknown-Substantial,Minor                             65.19394636 0.9842772
## Unknown,Unknown-Substantial,Minor                    206.88766312 0.9984463
## Substantial,Substantial-Substantial,None              91.48269898 0.9999984
## Substantial,Substantial,None-Substantial,None        235.73778088 0.9847270
## Unknown-Substantial,None                             112.58535794 0.9604217
## Unknown,Unknown-Substantial,None                     235.73778088 0.9847270
## Substantial,Substantial,None-Substantial,Substantial 201.54622937 0.9980034
## Unknown-Substantial,Substantial                       44.81510152 0.3060106
## Unknown,Unknown-Substantial,Substantial              201.54622937 0.9980034
## Unknown-Substantial,Substantial,None                 108.17974252 0.9999970
## Unknown,Unknown-Substantial,Substantial,None         203.31899744 1.0000000
## Unknown,Unknown-Unknown                              182.00690302 0.9999970
# Visualize Variation in FatalityRate by Aircraft Damage
ggplot(crash_data, aes(x = AirCraftDamage, y = FatalityRate)) +
  geom_boxplot(fill = "lightpink", alpha = 0.6) +
  coord_flip() +  # Rotate for better readability
  labs(title = "Variation of Fatality Rate by Aircraft Damage",
       x = "Aircraft Damage", y = "Fatality Rate (%)") +
  theme_minimal()
## Warning: Removed 24288 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

Interpretation:

Conclusion

πŸ”Ή Data Preprocessing

  • Cleaned the aviation dataset by handling missing values and standardizing important fields.
  • Created new features like FatalityRate and categorized incidents by IncidentSeverity.

πŸ”Ή Key Findings from EDA

  • Aviation incidents are concentrated in a few specific states.
  • Small aircraft categories (like light airplanes) show higher average fatality rates.
  • Certain months have higher incident rates, suggesting seasonal patterns.

πŸ”Ή Regression Insights

  • Fatality rate is influenced by multiple factors like Number of Engines, Weather Condition, and Latitude.
  • Incidents involving amateur-built aircraft have a statistically higher fatality risk.
  • Fatalities have decreased over time, but occasional spikes indicate areas for improvement.

πŸ”Ή ANOVA Test Results

  • Significant differences in FatalityRate exist across AirCraftCategory, WeatherCondition, PurposeOfFlight, and IncidentSeverity.
  • Damage severity (AirCraftDamage) is strongly linked to higher fatality rates.

πŸ”Ή Geographical Impact

  • State-wise analysis shows accident hotspots.
  • Incidents in the Southern Hemisphere showed higher fatal injury counts compared to the Northern Hemisphere.

πŸ”Ή Temporal Trend

  • There is an overall decline in fatal injuries over the years, reflecting gradual improvements in aviation safety.

πŸ”Ή Engine Count

  • The number of engines slightly affects the severity β€” but it’s less impactful compared to weather and flight purpose.

πŸ”Ή Weather Influence

  • Poor weather conditions (IMC) drastically increase fatality rates compared to visual conditions (VMC).

Summary

Overall, multiple operational and environmental factors β€” including aircraft type, flight purpose, weather conditions, and damage levels β€” significantly impact the severity of aviation accidents.
This analysis supports data-driven recommendations for targeted safety improvements in the aviation sector.

Key Takeaways and Insights


Summary:
The project highlights that aviation safety is a multi-dimensional challenge, influenced by aircraft type, environmental conditions, flight purpose, and operational settings.
Proactive, data-driven interventions targeting these factors can substantially improve aviation outcomes.

REFERENCES