if (require(fmsb)==FALSE) { install.packages("fmsb"); library(fmsb) }
## Loading required package: fmsb
pop <- c(3775, 3872, 637)
names(pop) <- c("Kinomoto", "Futaba", "Marumori")
fever <- c(50, 58, 5)
cough <- c(386, 521, 59)
gumbleed <- c(142, 212, 17)
nosebleed <- c(14, 43, 5)
nofe <- pop-fever
noco <- pop-cough
nogu <- pop-gumbleed
nono <- pop-nosebleed
oddsratio(fever[2], fever[1], nofe[2], nofe[1])
##            Disease Nondisease Total
## Exposed         58       3814  3872
## Nonexposed      50       3725  3775
## Total          108       7539  7647
## 
##  Odds ratio estimate and its significance probability
## 
## data:  fever[2] fever[1] nofe[2] nofe[1]
## p-value = 0.5205
## 95 percent confidence interval:
##  0.7740559 1.6581920
## sample estimates:
## Kinomoto 
## 1.132931
oddsratio(cough[2], cough[1], noco[2], noco[1])
##            Disease Nondisease Total
## Exposed        521       3351  3872
## Nonexposed     386       3389  3775
## Total          907       6740  7647
## 
##  Odds ratio estimate and its significance probability
## 
## data:  cough[2] cough[1] noco[2] noco[1]
## p-value = 1.255e-05
## 95 percent confidence interval:
##  1.186693 1.570206
## sample estimates:
## Kinomoto 
## 1.365047
oddsratio(gumbleed[2], gumbleed[1], nogu[2], nogu[1])
##            Disease Nondisease Total
## Exposed        212       3660  3872
## Nonexposed     142       3633  3775
## Total          354       7293  7647
## 
##  Odds ratio estimate and its significance probability
## 
## data:  gumbleed[2] gumbleed[1] nogu[2] nogu[1]
## p-value = 0.0003634
## 95 percent confidence interval:
##  1.192338 1.841892
## sample estimates:
## Kinomoto 
## 1.481944
oddsratio(nosebleed[2], nosebleed[1], nono[2], nono[1])
##            Disease Nondisease Total
## Exposed         43       3829  3872
## Nonexposed      14       3761  3775
## Total           57       7590  7647
## 
##  Odds ratio estimate and its significance probability
## 
## data:  nosebleed[2] nosebleed[1] nono[2] nono[1]
## p-value = 0.0001703
## 95 percent confidence interval:
##  1.647816 5.523421
## sample estimates:
## Kinomoto 
## 3.016882
oddsratio(nosebleed[3], nosebleed[1], nono[3], nono[1])
##            Disease Nondisease Total
## Exposed          5        632   637
## Nonexposed      14       3761  3775
## Total           19       4393  4412
## 
##  Odds ratio estimate and its significance probability
## 
## data:  nosebleed[3] nosebleed[1] nono[3] nono[1]
## p-value = 0.1399
## 95 percent confidence interval:
##  0.7628781 5.9210851
## sample estimates:
## Kinomoto 
## 2.125339
pairwise.fisher.test(fever, pop)
## 
##  Pairwise comparisons using Pairwise comparison of proportions (Fisher) 
## 
## data:  fever out of pop 
## 
##   1    2   
## 2 0.67 -   
## 3 0.67 0.60
## 
## P value adjustment method: holm
pairwise.fisher.test(cough, pop)
## 
##  Pairwise comparisons using Pairwise comparison of proportions (Fisher) 
## 
## data:  cough out of pop 
## 
##   1      2     
## 2 4e-05  -     
## 3 0.4778 0.0065
## 
## P value adjustment method: holm
pairwise.fisher.test(gumbleed, pop)
## 
##  Pairwise comparisons using Pairwise comparison of proportions (Fisher) 
## 
## data:  gumbleed out of pop 
## 
##   1      2     
## 2 0.0012 -     
## 3 0.2055 0.0035
## 
## P value adjustment method: holm
pairwise.fisher.test(nosebleed, pop)
## 
##  Pairwise comparisons using Pairwise comparison of proportions (Fisher) 
## 
## data:  nosebleed out of pop 
## 
##   1       2      
## 2 0.00047 -      
## 3 0.35765 0.67529
## 
## P value adjustment method: holm