# open the packages need to import (haven) and manage (tidyverse) the data
library(package = "tidyverse")
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.3 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── 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(package = "haven")
library(package = "table1")
##
## Attaching package: 'table1'
##
## The following objects are masked from 'package:base':
##
## units, units<-
library(package = "labelled")
library(package = "descr")
# import the data
library(readr)
cdc <- read_csv("C:/Users/cobby/OneDrive/Desktop/biostatistics class/project/cdc.csv")
## New names:
## • `` -> `...1`
## Warning: One or more parsing issues, call `problems()` on your data frame for details,
## e.g.:
## dat <- vroom(...)
## problems(dat)
## Rows: 445132 Columns: 327
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): IDATE, IMONTH, IDAY
## dbl (319): ...1, _STATE, FMONTH, IYEAR, DISPCODE, SEQNO, _PSU, CTELENM1, PVT...
## lgl (5): COLGHOUS, COLGSEX1, TOLDCFS, HAVECFS, WORKCFS
##
## ℹ 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.
# 2) Examine imported data
head(cdc, 10)
## # A tibble: 10 × 327
## ...1 `_STATE` FMONTH IDATE IMONTH IDAY IYEAR DISPCODE SEQNO `_PSU`
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 1 1 1 02032022 02 03 2022 1100 2022000001 2.02e9
## 2 2 1 1 02042022 02 04 2022 1100 2022000002 2.02e9
## 3 3 1 1 02022022 02 02 2022 1100 2022000003 2.02e9
## 4 4 1 1 02032022 02 03 2022 1100 2022000004 2.02e9
## 5 5 1 1 02022022 02 02 2022 1100 2022000005 2.02e9
## 6 6 1 1 02112022 02 11 2022 1100 2022000006 2.02e9
## 7 7 1 1 02032022 02 03 2022 1100 2022000007 2.02e9
## 8 8 1 1 02092022 02 09 2022 1100 2022000008 2.02e9
## 9 9 1 1 02022022 02 02 2022 1100 2022000009 2.02e9
## 10 10 1 1 02072022 02 07 2022 1100 2022000010 2.02e9
## # ℹ 317 more variables: CTELENM1 <dbl>, PVTRESD1 <dbl>, COLGHOUS <lgl>,
## # STATERE1 <dbl>, CELPHON1 <dbl>, LADULT1 <dbl>, COLGSEX1 <lgl>,
## # NUMADULT <dbl>, LANDSEX1 <dbl>, NUMMEN <dbl>, NUMWOMEN <dbl>,
## # RESPSLCT <dbl>, SAFETIME <dbl>, CTELNUM1 <dbl>, CELLFON5 <dbl>,
## # CADULT1 <dbl>, CELLSEX1 <dbl>, PVTRESD3 <dbl>, CCLGHOUS <dbl>,
## # CSTATE1 <dbl>, LANDLINE <dbl>, HHADULT <dbl>, SEXVAR <dbl>, GENHLTH <dbl>,
## # PHYSHLTH <dbl>, MENTHLTH <dbl>, POORHLTH <dbl>, PRIMINSR <dbl>, …
Is there a statistical significance module to predict the outcome of STROKE given the frequency of days smoked, BMI, Race, Age and sex?
The purpose of the research is to determine the factors that contribute significantly to the the risk of stroke and how those factors correlate with each other.
Ever diagnosed with a Stroke? = CVDSTRK3
The frequency of days now smoking = SMOKDAY2 BMI - Computed body mass index categories = _BMI5CAT Race - Computed Five level race/ethnicity category = _RACEGR4 Age - Imputed age in six groups = _AGE_G sex - Calculated sex variable = _SEX
The Behavioral Risk Factor Surveillance System (BRFSS) was collected in 2022.
The 2022 data collection was done via landline telephone and cellular telephone surveys and is available on the BRFSS website. To allow for a wider range of questions in optional modules, the combined landline telephone and cellular telephone data for 2022 include up to three split versions of the questionnaire.
The 2022 BRFSS data has 445132 observations and 327 variables.
CVDSTRK3 - categorical (1=yes, 2=no, 3=don’t know, 9=refused)
SMOKDAY2 - categorical variable, (1=everyday, 2=some-days, 3=not at all, 7=don’t know, 9=refused)
_AGE_G - Numerical variable, continuous data (1=18-24, 2=25-34, 3=35-44, 4=45-54, 5=55-64, 6=65 or older)
_SEX - categorical variable, factor data type (1=male, 2=female)
_RACEGR4 - categorical variable, factor data type (1=white only non Hispanic, 2=black only non Hispanic, 3=other races only non Hispanic, 4=multiracial, 5=Hispanic, 9=don’t know/refused)
_BMI5CAT - Numerical variable, continuous data type, has 2 implied decimal places (1= <1850 - underweight, 2= 1850 to <2500 - normal, 3= 2500 to < 3000 - overweight, 4= 3000 to <9999 - obese)
cdcstroke_2022 <- cdc %>%
select(CVDSTRK3, SMOKDAY2, `_AGE_G`, `_RACEGR4`, `_BMI5`, `_SEX`)
# summarize the data frame
summary(object = cdcstroke_2022)
## CVDSTRK3 SMOKDAY2 _AGE_G _RACEGR4
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.000
## 1st Qu.:2.000 1st Qu.:2.00 1st Qu.:3.000 1st Qu.:1.000
## Median :2.000 Median :3.00 Median :5.000 Median :1.000
## Mean :1.976 Mean :2.49 Mean :4.382 Mean :1.884
## 3rd Qu.:2.000 3rd Qu.:3.00 3rd Qu.:6.000 3rd Qu.:2.000
## Max. :9.000 Max. :9.00 Max. :6.000 Max. :9.000
## NA's :2 NA's :281079 NA's :2
## _BMI5 _SEX
## Min. :1202 Min. :1.00
## 1st Qu.:2413 1st Qu.:1.00
## Median :2744 Median :2.00
## Mean :2853 Mean :1.53
## 3rd Qu.:3175 3rd Qu.:2.00
## Max. :9964 Max. :2.00
## NA's :48806
str(cdcstroke_2022)
# check variables
str(cdcstroke_2022)
## tibble [445,132 × 6] (S3: tbl_df/tbl/data.frame)
## $ CVDSTRK3: num [1:445132] 2 2 2 2 2 1 2 2 2 2 ...
## $ SMOKDAY2: num [1:445132] NA NA NA 2 NA NA 3 NA 3 NA ...
## $ _AGE_G : num [1:445132] 6 6 5 6 3 6 6 6 6 6 ...
## $ _RACEGR4: num [1:445132] 1 1 1 1 1 1 2 1 1 1 ...
## $ _BMI5 : num [1:445132] NA 2657 2561 2330 2177 ...
## $ _SEX : num [1:445132] 2 2 2 2 2 1 2 2 2 2 ...
# summarize the small data set
summary(object = cdcstroke_2022)
## CVDSTRK3 SMOKDAY2 _AGE_G _RACEGR4
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.000
## 1st Qu.:2.000 1st Qu.:2.00 1st Qu.:3.000 1st Qu.:1.000
## Median :2.000 Median :3.00 Median :5.000 Median :1.000
## Mean :1.976 Mean :2.49 Mean :4.382 Mean :1.884
## 3rd Qu.:2.000 3rd Qu.:3.00 3rd Qu.:6.000 3rd Qu.:2.000
## Max. :9.000 Max. :9.00 Max. :6.000 Max. :9.000
## NA's :2 NA's :281079 NA's :2
## _BMI5 _SEX
## Min. :1202 Min. :1.00
## 1st Qu.:2413 1st Qu.:1.00
## Median :2744 Median :2.00
## Mean :2853 Mean :1.53
## 3rd Qu.:3175 3rd Qu.:2.00
## Max. :9964 Max. :2.00
## NA's :48806
cdcstroke_2022 <- cdc %>%
select(CVDSTRK3, SMOKDAY2, `_AGE_G`, `_RACEGR4`, `_BMI5`, `_SEX`) %>%
mutate(CVDSTRK3 = recode_factor(CVDSTRK3,
"1" = "Yes",
"2" = "No",
"7" = NA_character_,
"9" = NA_character_,
"blank" = NA_character_)) %>%
mutate(SMOKDAY2 = recode_factor(SMOKDAY2,
"1" = "Everyday",
"2" = "Some Days",
"3" = "Not At All",
"7" = NA_character_,
"9" = NA_character_,
"Blank" = NA_character_)) %>%
mutate(`_AGE_G` = recode_factor(`_AGE_G`,
"1" = "18 to 24",
"2" = "25 to 34",
"3" = "35 to 44",
"4" = "45 to 54",
"5" = "55 to 64",
"6" = "65 or Older")) %>%
mutate(`_RACEGR4` = recode_factor(`_RACEGR4`,
"1" = "White only, Non-Hispanic",
"2" = "Black only, Non-Hispanic",
"3" = "Other Race only, Non-Hispanic",
"4" = "Multiracial, Non-Hispanic",
"5" = "Hispanic",
"9" = NA_character_,
"Blank" = NA_character_)) %>%
mutate(`_BMI5` = as.numeric(`_BMI5`)) %>%
mutate(`_SEX` = recode_factor(`_SEX`,
"1" = "Male",
"2" = "Female")) %>%
rename(diagnosedStroke = CVDSTRK3) %>%
rename(daysSmoked = SMOKDAY2) %>%
rename(ageYears = `_AGE_G`) %>%
rename(race = `_RACEGR4`) %>%
rename(bodyMassIndex = `_BMI5`) %>%
rename(sexatBirth = `_SEX`) %>%
drop_na()
## Warning: There was 1 warning in `mutate()`.
## ℹ In argument: `CVDSTRK3 = recode_factor(...)`.
## Caused by warning in `recode.numeric()`:
## ! NAs introduced by coercion
## Warning: There was 1 warning in `mutate()`.
## ℹ In argument: `SMOKDAY2 = recode_factor(...)`.
## Caused by warning in `recode.numeric()`:
## ! NAs introduced by coercion
## Warning: There was 1 warning in `mutate()`.
## ℹ In argument: `_RACEGR4 = recode_factor(...)`.
## Caused by warning in `recode.numeric()`:
## ! NAs introduced by coercion
#check working progress
summary(object = cdcstroke_2022)
## diagnosedStroke daysSmoked ageYears
## Yes: 9058 Everyday : 33222 18 to 24 : 3046
## No :141086 Some Days : 12754 25 to 34 :12134
## Not At All:104168 35 to 44 :20485
## 45 to 54 :21637
## 55 to 64 :30080
## 65 or Older:62762
## race bodyMassIndex sexatBirth
## White only, Non-Hispanic :119407 Min. :1205 Male :79637
## Black only, Non-Hispanic : 9701 1st Qu.:2433 Female:70507
## Other Race only, Non-Hispanic: 6525 Median :2755
## Multiracial, Non-Hispanic : 3881 Mean :2873
## Hispanic : 10630 3rd Qu.:3197
## Max. :9964
cdcstroke_2022 %>%
ggplot(aes(x = bodyMassIndex)) +
geom_histogram( fill = '#DF2121')+
theme_minimal() +
labs(y = "COUNT",
x = "BODY MASS INDEX",
title = "BMI OF PARTICIPANTS")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
cdcstroke_2022 %>%
ggplot(aes(x = diagnosedStroke)) +
geom_bar( fill = '#20E0BD')+
theme_minimal() +
labs(y = "COUNT",
x = "INCIDENCE OF STROKE",
title = "PARTICIPANTS DIAGNOSED WITH STROKE")
cdcstroke_2022 %>%
ggplot(aes(x = daysSmoked)) +
geom_bar( fill = '#7632BF')+
theme_minimal() +
labs(y = "COUNT",
x = "DAYS SMOKED",
title = "NUMBER OF DAYS SMOKED")
cdcstroke_2022 %>%
ggplot(aes(x = ageYears)) +
geom_bar( fill = '#1E1BCA')+
theme_minimal() +
labs(y = "COUNT",
x = "AGE",
title = "AGE OF SMOKING")
cdcstroke_2022 %>%
ggplot(aes(y = race)) +
geom_bar( fill = '#F2E8D6')+
theme_minimal() +
labs(y = "RACE",
x = "COUNT",
title = "ETHNICITY OF PARTICIPANTS")
cdcstroke_2022 %>%
ggplot(aes(x = sexatBirth)) +
geom_bar( fill = '#00FFFF')+
theme_minimal() +
labs(y = "COUNT",
x = "SEX",
title = "SEX AT BIRTH")
table1(~ diagnosedStroke + daysSmoked + ageYears + race + bodyMassIndex + sexatBirth|diagnosedStroke,
render.continuous = "Median (IQR)",
data = cdcstroke_2022)
| Yes (N=9058) |
No (N=141086) |
Overall (N=150144) |
|
|---|---|---|---|
| diagnosedStroke | |||
| Yes | 9058 (100%) | 0 (0%) | 9058 (6.0%) |
| No | 0 (0%) | 141086 (100%) | 141086 (94.0%) |
| daysSmoked | |||
| Everyday | 2317 (25.6%) | 30905 (21.9%) | 33222 (22.1%) |
| Some Days | 778 (8.6%) | 11976 (8.5%) | 12754 (8.5%) |
| Not At All | 5963 (65.8%) | 98205 (69.6%) | 104168 (69.4%) |
| ageYears | |||
| 18 to 24 | 28 (0.3%) | 3018 (2.1%) | 3046 (2.0%) |
| 25 to 34 | 161 (1.8%) | 11973 (8.5%) | 12134 (8.1%) |
| 35 to 44 | 453 (5.0%) | 20032 (14.2%) | 20485 (13.6%) |
| 45 to 54 | 879 (9.7%) | 20758 (14.7%) | 21637 (14.4%) |
| 55 to 64 | 1910 (21.1%) | 28170 (20.0%) | 30080 (20.0%) |
| 65 or Older | 5627 (62.1%) | 57135 (40.5%) | 62762 (41.8%) |
| race | |||
| White only, Non-Hispanic | 6996 (77.2%) | 112411 (79.7%) | 119407 (79.5%) |
| Black only, Non-Hispanic | 907 (10.0%) | 8794 (6.2%) | 9701 (6.5%) |
| Other Race only, Non-Hispanic | 411 (4.5%) | 6114 (4.3%) | 6525 (4.3%) |
| Multiracial, Non-Hispanic | 280 (3.1%) | 3601 (2.6%) | 3881 (2.6%) |
| Hispanic | 464 (5.1%) | 10166 (7.2%) | 10630 (7.1%) |
| bodyMassIndex | 2780 (806) | 2750 (760) | 2760 (764) |
| sexatBirth | |||
| Male | 4780 (52.8%) | 74857 (53.1%) | 79637 (53.0%) |
| Female | 4278 (47.2%) | 66229 (46.9%) | 70507 (47.0%) |
Out of 150,144 total participants, 9,058 participants (6.0%) disclosed a previous stroke diagnosis and 141,086 participants (94.0%) reported no history of stroke. Additionally, 33,222 participants (22.1%) reported daily smoking, while 12,754 (8.5%) reported smoking on some days, and the majority - 104,168 participants (69.4%) - reported no smoking at all. Breaking down the data by age groups, the 18-24 age category had 3,046 participants (2.0%), followed by 25-34 year olds with 12,134 participants (8.1%), 35-44 year olds with 20,485 participants (13.6%), 25-54 year olds with 21,637 participants (14.4%), 55-64 year olds with 30,080 participants (20.0%), and lastly, 65 years and above with 62,762 (41.8%). In terms of racial categories, the majority of the sample (79.5%) identified as White only, Non-Hispanic, while a smaller proportion identified as Black only, Non-Hispanic (6.5%), Other Race only, Non-Hispanic (4.3%), Multiracial, Non-Hispanic (2.6%), and Hispanic (7.1%).
Regarding Body Mass Index (BMI), the average for the sample was 2,760 with a standard deviation of 764. This suggests a wide range of BMI values among the participants. When it comes to sex at birth, males comprised just over half (53.0%) of the overall sample, while females made up the remaining 47.0%. These findings illustrate the diversity within our sample in terms of race, BMI, and sex at birth. Genders were divided almost equally between male and female, but it is worth noting that the majority of individuals identified as white, with smaller proportions identifying as the other categories of race.
cdcstroke_2022 %>%
group_by(diagnosedStroke, daysSmoked) %>%
count() %>%
group_by(diagnosedStroke) %>%
mutate(perc.diagnosedStroke = 100 * n / sum(n)) %>%
ggplot(aes(x = diagnosedStroke, y = perc.diagnosedStroke, fill = daysSmoked)) +
geom_col(position = "dodge") +
theme_minimal() +
labs(x = "Diagnosed Stroke",
y = "Percent within Diagnosed Stroke Category",
fill = "Days Smoked") +
coord_flip()
In the sample of 150144 participants, a significant proportion (69.4%) reported no history of smoking, while 22.1% were daily smokers and 8.5% were occasional smokers. Notably, a vast majority (65.8%) of stroke patients did not report any smoking habits. This finding highlights the importance of not overlooking the majority of stroke survivors who may not have a history of smoking.
H0: There is no relationship between Days Smoked and Diagnosed Stroke.
HA: There is a relationship between Days Smoked and Diagnosed Stroke.
CrossTable(y = cdcstroke_2022$diagnosedStroke,
x = cdcstroke_2022$daysSmoked,
chisq = TRUE,
expected = TRUE,
sresid = TRUE,
prop.c = FALSE,
prop.t = FALSE,
prop.chisq = FALSE)
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | N / Row Total |
## | Std Residual |
## |-------------------------|
##
## ======================================================
## cdcstroke_2022$diagnosedStroke
## cdcstroke_2022$daysSmoked Yes No Total
## ------------------------------------------------------
## Everyday 2317 30905 33222
## 2004.2 31217.8
## 0.070 0.930 0.221
## 6.986 -1.770
## ------------------------------------------------------
## Some Days 778 11976 12754
## 769.4 11984.6
## 0.061 0.939 0.085
## 0.309 -0.078
## ------------------------------------------------------
## Not At All 5963 98205 104168
## 6284.3 97883.7
## 0.057 0.943 0.694
## -4.053 1.027
## ------------------------------------------------------
## Total 9058 141086 150144
## ======================================================
##
## Statistics for All Table Factors
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 69.52484 d.f. = 2 p = 8e-16
This analysis indicates that there’s a statistically significant relationship between the frequency of smoking and the likelihood of being diagnosed with a stroke. The p-value being extremely small (p < 0.001), [\(\chi^2\)(2) = 69.52; p < .05] suggests strong evidence against the null hypothesis hence null hypotheses is rejected.
cdcstroke_2022 %>%
group_by(diagnosedStroke, ageYears) %>%
count() %>%
group_by(diagnosedStroke) %>%
mutate(perc.diagnosedStroke = 100 * n / sum(n)) %>%
ggplot(aes(x = diagnosedStroke, y = perc.diagnosedStroke, fill = ageYears)) +
geom_col(position = "dodge") +
theme_minimal() +
labs(x = "Diagnosed Stroke",
y = "Percent within Diagnosed Stroke Category",
fill = "Age in Years") +
coord_flip()
Among the participants in this study, those in the 65 years or older age group had the highest occurrence of stroke, accounting for 62.1%. Conversely, the lowest incidence was observed in the youngest age group of 18 to 24 years, at just 0.3%. Interestingly, the majority of individuals without stroke fell within the 65 or older age range.
H0: There is no relationship between having a Age in Years and Diagnosed Stroke status
HA: There is a relationship between having a Age in Years and Diagnosed Stroke status
CrossTable(y = cdcstroke_2022$diagnosedStroke,
x = cdcstroke_2022$ageYears,
chisq = TRUE,
expected = TRUE,
sresid = TRUE,
prop.c = FALSE,
prop.t = FALSE,
prop.chisq = FALSE)
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | N / Row Total |
## | Std Residual |
## |-------------------------|
##
## =====================================================
## cdcstroke_2022$diagnosedStroke
## cdcstroke_2022$ageYears Yes No Total
## -----------------------------------------------------
## 18 to 24 28 3018 3046
## 183.8 2862.2
## 0.009 0.991 0.020
## -11.490 2.911
## -----------------------------------------------------
## 25 to 34 161 11973 12134
## 732.0 11402.0
## 0.013 0.987 0.081
## -21.105 5.348
## -----------------------------------------------------
## 35 to 44 453 20032 20485
## 1235.8 19249.2
## 0.022 0.978 0.136
## -22.268 5.642
## -----------------------------------------------------
## 45 to 54 879 20758 21637
## 1305.3 20331.7
## 0.041 0.959 0.144
## -11.800 2.990
## -----------------------------------------------------
## 55 to 64 1910 28170 30080
## 1814.7 28265.3
## 0.063 0.937 0.200
## 2.237 -0.567
## -----------------------------------------------------
## 65 or Older 5627 57135 62762
## 3786.4 58975.6
## 0.090 0.910 0.418
## 29.913 -7.579
## -----------------------------------------------------
## Total 9058 141086 150144
## =====================================================
##
## Statistics for All Table Factors
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2248.007 d.f. = 5 p <2e-16
The chi-squared test resulted in a very high Chi^2 value of 2248.007 with 5 degrees of freedom and an extremely small p-value (<2e-16), suggesting a highly significant association between age and the likelihood of being diagnosed with a stroke, Hence, the null hypotheses is rejected. Looking at the proportions across age groups, there seems to be an increasing trend in the proportion of diagnosed strokes as age increases. For instance, the proportion of diagnosed strokes increases from 0.020 in the 18 to 24 age group to 0.418 in the “65 or Older” age group.
cdcstroke_2022 %>%
group_by(diagnosedStroke, race) %>%
count() %>%
group_by(diagnosedStroke) %>%
mutate(perc.diagnosedStroke = 100 * n / sum(n)) %>%
ggplot(aes(x = diagnosedStroke, y = perc.diagnosedStroke, fill = race)) +
geom_col(position = "dodge") +
theme_minimal() +
labs(x = "Diagnosed Stroke",
y = "Percent within Diagnosed Stroke Category",
fill = "Race") +
coord_flip()
According to this study, the rate of stroke is most prevalent in individuals of White heritage, with a staggering 77.2% of cases. Close behind is the Black only race with a rate of 10%. Other races (non-Hispanic) and Hispanics have considerably lower rates, at 4.5% and 5.1%, respectively. Interestingly, Multiracial individuals have the lowest incidence of stroke at 3.1%. Additionally, the data reveals that those of White background have the highest proportion of individuals without a stroke diagnosis.
H0: There is no relationship between having a Race and Diagnosed Stroke status
HA: There is a relationship between having a Race and Diagnosed Stroke status
CrossTable(y = cdcstroke_2022$diagnosedStroke,
x = cdcstroke_2022$race,
chisq = TRUE,
expected = TRUE,
sresid = TRUE,
prop.c = FALSE,
prop.t = FALSE,
prop.chisq = FALSE)
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | N / Row Total |
## | Std Residual |
## |-------------------------|
##
## ===========================================================
## cdcstroke_2022$diagnosedStroke
## cdcstroke_2022$race Yes No Total
## -----------------------------------------------------------
## White only, Non-Hispanic 6996 112411 119407
## 7203.7 112203.3
## 0.059 0.941 0.795
## -2.447 0.620
## -----------------------------------------------------------
## Black only, Non-Hispanic 907 8794 9701
## 585.2 9115.8
## 0.093 0.907 0.065
## 13.300 -3.370
## -----------------------------------------------------------
## Other Race only, Non-Hispanic 411 6114 6525
## 393.6 6131.4
## 0.063 0.937 0.043
## 0.875 -0.222
## -----------------------------------------------------------
## Multiracial, Non-Hispanic 280 3601 3881
## 234.1 3646.9
## 0.072 0.928 0.026
## 2.997 -0.759
## -----------------------------------------------------------
## Hispanic 464 10166 10630
## 641.3 9988.7
## 0.044 0.956 0.071
## -7.001 1.774
## -----------------------------------------------------------
## Total 9058 141086 150144
## ===========================================================
##
## Statistics for All Table Factors
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 257.1537 d.f. = 4 p <2e-16
The Chi-squared test resulted in a significant Chi^2 value of 257.1537 with 4 degrees of freedom and an extremely small p-value (<2e-16), suggesting a highly significant association between race and the likelihood of being diagnosed with a stroke. Looking at proportions, different racial groups show varying proportions of diagnosed strokes. For instance, “Black only, Non-Hispanic” individuals have a higher proportion of diagnosed strokes (0.093) compared to other racial groups.
cdcstroke_2022 %>%
group_by(diagnosedStroke, sexatBirth) %>%
count() %>%
group_by(diagnosedStroke) %>%
mutate(perc.diagnosedStroke = 100 * n / sum(n)) %>%
ggplot(aes(x = diagnosedStroke, y = perc.diagnosedStroke, fill = sexatBirth)) +
geom_col(position = "dodge") +
theme_minimal() +
labs(x = "Diagnosed Stroke",
y = "Percent within Diagnosed Stroke Category",
fill = "Sex") +
coord_flip()
According to this study, a higher percentage of males (52.8%) have been diagnosed with stroke compared to females (47.2%). Additionally, higher proportion of males (53.1%) remain free from stroke compared to females (46.9%) who have a similar rate of being diagnosed with the condition.
H0: There is no relationship between having a Sex and Diagnosed Stroke status.
HA: There is a relationship between having a Sex and Diagnosed Stroke status.
CrossTable(y = cdcstroke_2022$diagnosedStroke,
x = cdcstroke_2022$sexatBirth,
chisq = TRUE,
expected = TRUE,
sresid = TRUE,
prop.c = FALSE,
prop.t = FALSE,
prop.chisq = FALSE)
## Cell Contents
## |-------------------------|
## | N |
## | Expected N |
## | N / Row Total |
## | Std Residual |
## |-------------------------|
##
## ======================================================
## cdcstroke_2022$diagnosedStroke
## cdcstroke_2022$sexatBirth Yes No Total
## ------------------------------------------------------
## Male 4780 74857 79637
## 4804.4 74832.6
## 0.060 0.940 0.530
## -0.352 0.089
## ------------------------------------------------------
## Female 4278 66229 70507
## 4253.6 66253.4
## 0.061 0.939 0.470
## 0.374 -0.095
## ------------------------------------------------------
## Total 9058 141086 150144
## ======================================================
##
## Statistics for All Table Factors
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 0.2808451 d.f. = 1 p = 0.596
##
## Pearson's Chi-squared test with Yates' continuity correction
## ------------------------------------------------------------
## Chi^2 = 0.2694534 d.f. = 1 p = 0.604
The Chi-squared test results show very low Chi^2 values (0.2808451 and 0.2694534) with 1 degree of freedom and relatively high p-values (0.596 and 0.604, respectively). A higher p-value > 0.5 implies that there isn’t a significant association between sex at birth and the likelihood of being diagnosed with a stroke based on this data set. Hence we fail to reject the null hypotheses. The proportions of diagnosed strokes for males and females are quite close, with males at 0.060 and females at 0.061. This similarity in proportions further supports the Chi-squared test results indicating a lack of significant association between sex at birth and diagnosed strokes.
cdcstroke_2022 %>%
ggplot(aes(x = bodyMassIndex, y = diagnosedStroke)) +
geom_boxplot() +
theme_minimal() +
labs(x = "BODY MASS INDEX", y = "DIAGNOSED WITH STROKE")
The box plot shows that the median “BMI” for those diagnosed with Stroke is not noticeably different from the median “BMI” for those not diagnosed with Stroke. This implies that, on average, BMI may not play a considerable role in distinguishing between the two groups in this study. However, it is important to note that this finding alone does not offer conclusive evidence of a strong relationship between stroke and BMI. It simply suggests that, at the median level, BMI is not a distinguishing factor between the two groups.
cdcstroke_2022 %>%
ggplot(aes(x = bodyMassIndex)) +
geom_histogram() +
facet_grid(cols = vars(diagnosedStroke))
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
From inspection, the variable BMI are not normally distributed across both diagnosed stroke and not diagnosed stroke. Heavily skewed variable in the not diagnosed stroke category.
car::leveneTest(y = bodyMassIndex ~ diagnosedStroke, data = cdcstroke_2022)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 13.431 0.0002476 ***
## 150142
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
H0: The null hypothesis for Levene’s Test is that the variances are equal. HA: The alternate hypothesis is that the variances are not equal.
The p-value (0.0002476) is much smaller than a typical significance level of 0.05. Therefore, we reject the null hypothesis. This implies that there is a significant difference in variances between Body Mass Index and Diagnosed Stroke variables. Hence the assumption of homogeneity of variance might not be met due to the significant difference in variances between Body Mass Index and Diagnosed Stroke variables.
# test the distribution of BMI by diagnosed Stroke status
wilcox.test(formula = cdcstroke_2022$bodyMassIndex ~ cdcstroke_2022$diagnosedStroke,
paired = FALSE)
##
## Wilcoxon rank sum test with continuity correction
##
## data: cdcstroke_2022$bodyMassIndex by cdcstroke_2022$diagnosedStroke
## W = 644304295, p-value = 0.1829
## alternative hypothesis: true location shift is not equal to 0
The p-value associated with the Wilcoxon rank sum test for the comparison between BMI and diagnosed stroke is 0.1829, which is greater than the common significance level of 0.05, hence we fail to reject the null hypothesis. Therefore, based on this statistical analysis using the Wilcoxon rank sum test, there isn’t sufficient evidence to claim a statistically significant relationship between BMI and diagnosed stroke within the dataset.
The research findings underscore significant associations between several factors and diagnosed cases of stroke. Smoking habits stand out as a key factor, revealing a surprising majority of stroke patients who aren’t smokers. This emphasizes the need for comprehensive smoking cessation programs and awareness campaigns targeting both smokers and non-smokers for stroke prevention. Age emerges as another critical factor, with stroke incidence peaking among individuals aged 65 and older. This highlights the necessity for tailored interventions and screenings for older age groups. Racial disparities are evident, with higher stroke rates among White and Black individuals and lower rates among Multiracial groups. This calls for tailored interventions and accessible care for diverse communities, emphasizing the need for specific interventions based on racial backgrounds.
In contrast, no significant correlation was found between sex at birth and stroke incidence, indicating similar rates among genders. This, however, stresses the need for further research and interventions inclusive of both genders. Interestingly, BMI did not show a significant link to diagnosed stroke, suggesting that BMI alone may not distinguish between those with and without stroke. Yet, it highlights the importance of exploring weight management’s role in stroke prevention and adopting holistic health approaches. Overall, these findings are crucial for designing targeted preventive measures and interventions to address stroke risk across diverse populations. Understanding these specific risk factors can significantly impact public health efforts in combating stroke.
This study aims to enhance our understanding of how smoking habits relate to stroke risk in young adults. By considering factors like age, gender, race, BMI, and existing medical conditions, it sheds light on the intricate relationship, aiding future investigations and potentially improving prevention strategies (Putaala 2020). The findings could significantly impact stroke epidemiology, especially among younger populations, providing insights for more targeted interventions (Chatzikonstantinou, Wolf, and Hennerici 2012). Additionally, it builds upon prior research connecting smoking to cardiovascular diseases, offering valuable guidance for healthcare providers in designing effective smoking cessation approaches and emphasizing early stroke risk assessment(Love 1990).
The study’s results hold potential for shaping public health policies and actions targeting smoking among young adults. If a clear connection between smoking and Ischemic stroke is established, it will reinforce the need for tailored anti-smoking campaigns and cessation programs for this group(Aradine et al. 2022a; Ohya et al. 2022). Despite substantial evidence linking smoking to diseases like stroke, the fact that 20.9% (45.1 million individuals) in the US identified as smokers in 2005 and 750,000 young people started smoking each year is concerning. These findings advocate for specific preventive measures, offering opportunities to reduce stroke risk in this age group through targeted education and interventions(Aradine et al. 2022b).
Focusing on an age gap of 18 to 50-year-olds yields vital insights, and this case-control study design’s strength lies in assessing causality and aiding preventive strategies. The data supports advocates combatting smoking-related health issues and raising awareness of smoking risks(Balci et al. 2011a). Public health bodies can use these findings to educate young adults about specific smoking risks, empowering informed health choices.6 Disseminating these findings raises awareness about smoking’s health risks, empowering individuals to opt for healthier lifestyles and seek support for quitting smoking(Balci et al. 2011b; Jaffre et al. 2015).