library(xlsx)
## Warning: package 'xlsx' was built under R version 4.1.2
library(stats)

Gender against dysphagia.

Null Hypothesis: There is no association between Age and Disphagia

Alternative hypothesis: There a strong association betwween sex and dysphagia.

data <- read.xlsx("data/Data-with-Codes.xlsx",1)
summary(data)  
##  PARTICIPANT.IDENTIFIER. SEX..Female...1..Male...2.
##  Min.   : 1.00           Min.   :1.0               
##  1st Qu.: 5.75           1st Qu.:1.0               
##  Median :10.50           Median :2.0               
##  Mean   :10.50           Mean   :1.7               
##  3rd Qu.:15.25           3rd Qu.:2.0               
##  Max.   :20.00           Max.   :2.0               
##  NA's   :12              NA's   :12                
##  AGE..days...0.7.1..8.14.2..15.21.3..22..4
##  Min.   :1.00                             
##  1st Qu.:1.00                             
##  Median :1.00                             
##  Mean   :1.55                             
##  3rd Qu.:2.00                             
##  Max.   :4.00                             
##  NA's   :12                               
##  BIRTHWEIGHT..1.HBW..2..NBW..3.LBW..4.VLBW..5.ELBW.
##  Length:32                                         
##  Class :character                                  
##  Mode  :character                                  
##                                                    
##                                                    
##                                                    
##                                                    
##  GESTATIONAL.AGE..1..26.30..2.31.35..3.36.40..4..41.
##  Min.   :1.0                                        
##  1st Qu.:2.0                                        
##  Median :2.0                                        
##  Mean   :2.4                                        
##  3rd Qu.:3.0                                        
##  Max.   :4.0                                        
##  NA's   :12                                         
##  MODE.OF.DELIVERY..NVD.1..CS.2. CURRENT.MODE.OF.FEEDING..Cup.1..Tube.2..BF.3.
##  Min.   :1.00                   Min.   :1                                    
##  1st Qu.:1.00                   1st Qu.:1                                    
##  Median :1.00                   Median :2                                    
##  Mean   :1.25                   Mean   :2                                    
##  3rd Qu.:1.25                   3rd Qu.:3                                    
##  Max.   :2.00                   Max.   :3                                    
##  NA's   :12                     NA's   :12                                   
##  Dysphagia.Present...Yes.1..No.2.
##  Min.   :1.00                    
##  1st Qu.:1.00                    
##  Median :1.00                    
##  Mean   :1.35                    
##  3rd Qu.:2.00                    
##  Max.   :2.00                    
##  NA's   :12                      
##  MORBIDITIES.AT.BIRTH..NNE.1..NNJ.2..NNS.3..Septicaemia.4..Prematurity.5..Meningitis.6..Hypoglycaemia.7..Abnormal.Heartrate.8.
##  Length:32                                                                                                                    
##  Class :character                                                                                                             
##  Mode  :character                                                                                                             
##                                                                                                                               
##                                                                                                                               
##                                                                                                                               
## 
# create a dataframe
# create a dataframe
df <- data.frame("Yes" = c(3, 9), "No" = c(3, 5), row.names = c("Female", "Male"))
df
##        Yes No
## Female   3  3
## Male     9  5
mosaicplot(df, color = TRUE)  

we fail to reject the null hypothesis (p >0.05) Thus, there is a strong relationship between sex and dysphagia.

fisher.test(df)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df
## p-value = 0.6424
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##  0.05321673 6.00208925
## sample estimates:
## odds ratio 
##  0.5726438

Model of delivery against dysphagia.

Null Hypothesis: There is no association between mode of delivery and Dysphagia

Alternative hypothesis: There a strong association between mode of delivery and dysphagia.

# create a dataframe
# create a dataframe
df1 <- data.frame("Yes" = c(11, 4), "No" = c(2, 3), row.names = c("NVD", "CS"))
df1
##     Yes No
## NVD  11  2
## CS    4  3

we fail to reject the null hypothesis (p >0.05) Thus, there is a strong relationship between Mode of delivery and dysphagia.

fisher.test(df1)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df1
## p-value = 0.2898
## alternative hypothesis: true odds ratio is not equal to 1
## 95 percent confidence interval:
##   0.3131724 62.4789942
## sample estimates:
## odds ratio 
##   3.805192

Age vs dysphagia

# create a dataframe
df2 <- data.frame("Yes" = c(10, 2, 1, 0), "No" = c(3, 2, 1, 1), 
                    row.names = c("0-7", "8-14", "15-21", "24+"))
df2
##       Yes No
## 0-7    10  3
## 8-14    2  2
## 15-21   1  1
## 24+     0  1

The P-value is two sided/tailed, thus we cannot conclude that the two parameters are associated, thus no sufficient information was provided.

fisher.test(df2)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df2
## p-value = 0.3728
## alternative hypothesis: two.sided

Birth weight against dysphagia

NB: ELBW was excluded because there were not data recorded,

# create a dataframe
df3 <- data.frame("Yes" = c(1, 3, 7, 2), "No" = c(0, 4, 2, 1), 
                    row.names = c("HBW", "NBW", "LBW", "VLBW"))
df3
##      Yes No
## HBW    1  0
## NBW    3  4
## LBW    7  2
## VLBW   2  1

The P-value is two sided/tailed, thus we cannot conclude that the two parameters are associated, thus no sufficient information was provided.

fisher.test(df3)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df3
## p-value = 0.5904
## alternative hypothesis: two.sided

Gestational Age and Dysphagia

df4 <- data.frame("Yes" = c(2, 7, 4, 0), "No" = c(0, 3, 2, 2), 
                    row.names = c("26-30", "31-35", "36-40", ">41"))
df4
##       Yes No
## 26-30   2  0
## 31-35   7  3
## 36-40   4  2
## >41     0  2
fisher.test(df4)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df4
## p-value = 0.3283
## alternative hypothesis: two.sided

The P-value is two sided/tailed, thus we cannot conclude that the two parameters are associated, thus no sufficient information was provided.

Current feeding mode and dysphagia

df5 <- data.frame("Yes" = c(7, 1, 5), "No" = c(2, 1, 4), 
                    row.names = c("cup", "Tube", "BF"))
df5
##      Yes No
## cup    7  2
## Tube   1  1
## BF     5  4
fisher.test(df5)
## 
##  Fisher's Exact Test for Count Data
## 
## data:  df5
## p-value = 0.5449
## alternative hypothesis: two.sided

The P-value is two sided/tailed, thus we cannot conclude that the two parameters are associated, thus no sufficient information was provided.