Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
dat <- vroom(...)
problems(dat)
Rows: 48760 Columns: 12
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Data As Of, Start Date, End Date, State, Condition Group, Condition...
dbl (2): Year, COVID-19 Deaths
lgl (3): ...10, ...11, ...12
ℹ 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.
In January of 2020, the Centers for Disease Control and Prevention (CDC) documented the first laboratory-confirmed case of Coronavirus disease (COVID-19) in the United States (CDC, 2023). COVID-19, caused by the SARS-CoV-2 virus, is an infectious disease transmissible through droplet and airborne particles (WHO, n.d.). Due to its high transmissibility, certain groups, particularly older individuals and those with pre-existing conditions, face a higher risk of mortality if infected. Vaccination efforts in the U.S. commenced on December 14, 2020, aimed at curbing the spread of the virus. To ensure fair distribution, federal initiatives were implemented to reach vulnerable communities promptly (ASPA, 2024). As of April 2024, a total of 1,187,509 deaths have been reported (CDC, 2024)
Methods
The dataset on COVID-19 deaths sourced from the National Vital Statistics System relies on provisional counts and observational data collection methods. Significant biases include reporting inconsistencies across jurisdictions, disparities in healthcare access impacting testing and death attribution, and challenges in accurately attributing causation. These biases should be considered when interpreting the data’s implications for understanding the relationship between COVID-19 and other health factors.
Demographics
My dataset encompasses several variables. First, it includes the years 2020 to 2023, indicating the timeframe of the study. The condition groups consist of various pre-existing conditions such as respiratory diseases, circulatory diseases, sepsis, malignant neoplasms, diabetes, obesity, Alzheimer’s disease, vascular and unspecified dementia, renal failure, and others. Within these condition groups, specific conditions are delineated, including influenza and pneumonia, chronic lower respiratory diseases, and more. Age groups are categorized from 0-24 to 95+, capturing different age demographics. The dataset also incorporates states, spanning across the United States, enabling regional analysis. The final variable records the number of COVID-19 deaths, serving as the primary outcome measure for the study.
Hypothesis
The overarching question guiding my research is: Do patients diagnosed with influenza and pneumonia exhibit a greater propensity for mortality from COVID-19 when contrasted with individuals harbouring other pre-existing conditions throughout the period spanning 2020 to 2023?
Bar Plot:
unique(data$Condition)
[1] "Influenza and pneumonia"
[2] "Chronic lower respiratory diseases"
[3] "Adult respiratory distress syndrome"
[4] "Respiratory failure"
[5] "Respiratory arrest"
[6] "Other diseases of the respiratory system"
[7] "Hypertensive diseases"
[8] "Ischemic heart disease"
[9] "Cardiac arrest"
[10] "Cardiac arrhythmia"
[11] "Heart failure"
[12] "Cerebrovascular diseases"
[13] "Other diseases of the circulatory system"
[14] "Sepsis"
[15] "Malignant neoplasms"
[16] "Diabetes"
[17] "Obesity"
[18] "Alzheimer disease"
[19] "Vascular and unspecified dementia"
[20] "Renal failure"
[21] "Intentional and unintentional injury, poisoning, and other adverse events"
[22] "All other conditions and causes (residual)"
[23] "COVID-19"
covid_data <- data %>%filter(!is.na(`COVID-19 Deaths`)) %>%filter(Year >=2020& Year <=2023)
# A bar plot comparing the average number of COVID-19 deaths per year among patients with Influenza and pneumonia versus patients with other pre-existing conditions can provide a visual comparison.covid_data2 <- covid_data %>%group_by(Condition, Year) %>%summarise(Total_Deaths =sum(`COVID-19 Deaths`))
`summarise()` has grouped output by 'Condition'. You can override using the
`.groups` argument.
ggplot(covid_data2, aes(x = Condition, y = Total_Deaths, fill =factor(Year))) +geom_bar(stat ="identity", position ="dodge") +labs(title ="Total COVID-19 Deaths per Condition (2020-2023)",x ="Condition",y ="Deaths",fill ="Year") +theme_minimal() +theme(axis.text.x =element_text(angle =45, hjust =1))
summary(covid_data2)
Condition Year Total_Deaths
Length:92 Min. :2020 Min. : 1134
Class :character 1st Qu.:2021 1st Qu.: 18045
Mode :character Median :2022 Median : 50332
Mean :2022 Mean : 96128
3rd Qu.:2022 3rd Qu.: 88375
Max. :2023 Max. :929750
Scatter Plot:
# A scatter plot showing the trend in the proportion of COVID-19 deaths among patients with influenza and pneumonia compared to patients with other pre-existing conditions over the years can help visualize any consistent patterns or changes.total_deaths <- covid_data %>%group_by(Year, Condition) %>%summarise(Total_Deaths =sum(`COVID-19 Deaths`), .groups ="drop")
# Plotting the scatter plotggplot(total_deaths, aes(x = Condition, y = Total_Deaths, color =factor(Year))) +geom_point() +scale_color_manual(values =c("2020"="red", "2021"="blue", "2022"="green", "2023"="purple")) +labs(title ="Total COVID-19 Deaths per Condition (2020-2023)",x ="Condition",y ="Total COVID-19 Deaths",color ="Year") +theme(axis.text.x =element_text(angle =45, hjust =1))
summary(total_deaths)
Year Condition Total_Deaths
Min. :2020 Length:92 Min. : 1134
1st Qu.:2021 Class :character 1st Qu.: 18045
Median :2022 Mode :character Median : 50332
Mean :2022 Mean : 96128
3rd Qu.:2022 3rd Qu.: 88375
Max. :2023 Max. :929750
Box Plot:
A box plot showing the distribution of COVID-19 deaths among patients with influenza and pneumonia versus patients with other pre-existing conditions across different age groups can help identify any significant differences in the impact of COVID-19 within different age groups.
# Filter data for influenza and pneumonia and other pre-existing conditionsinfluenza_pneumonia_data <-subset(covid_data, Condition =="Influenza and pneumonia")other_conditions_data <-subset(covid_data, Condition !="Influenza and pneumonia"& Condition !="COVID-19")
IP <- influenza_pneumonia_data %>%group_by(`Age Group`) %>%summarise(total =sum(`COVID-19 Deaths`))
Summary Statistics I will calculate:
Mean, median, and standard deviation of COVID-19 deaths per year for each pre-existing condition group to understand central tendency and variability.
Proportion of COVID-19 deaths attributed to influenza and pneumonia compared to other pre-existing conditions over the years to assess relative impact.
Distribution of COVID-19 deaths across different age groups within each condition group to examine age-related impacts.
Parameters to Estimate:
Relative risk of COVID-19 mortality associated with influenza and pneumonia compared to other pre-existing conditions.
Difference in mean COVID-19 deaths between patients with influenza and pneumonia versus other conditions.
Effect of age on COVID-19 mortality within each condition group.
Statistical Techniques I Will Use:
ANOVA (Analysis of Variance): To compare mean COVID-19 deaths across different pre-existing conditions and identify significant differences.
Logistic Regression: To assess the association between pre-existing conditions (including influenza and pneumonia) and COVID-19 mortality while controlling for potential confounders such as age.
Chi-Square Test: To examine the relationship between pre-existing conditions and COVID-19 mortality across different age groups, assessing whether the distribution of deaths differs significantly.
Conlusion
Will summarize my findings
Biblography
Centers for Disease Control and Prevention. (2024, April 19). CDC Covid Data tracker. Centers for Disease Control and Prevention. https://covid.cdc.gov/covid-data-tracker/#datatracker-home
Assistant Secretary for Public Affairs (ASPA). (2024, March 13). Covid-19 vaccines. HHS.gov. https://www.hhs.gov/coronavirus/covid-19-vaccines/index.html
Centers for Disease Control and Prevention. (2023, March 15). CDC Museum Covid-19 Timeline. Centers for Disease Control and Prevention. https://www.cdc.gov/museum/timeline/covid19.html
World Health Organization. (n.d.). Coronavirus. World Health Organization. https://www.who.int/health-topics/coronavirus#tab=tab_3