Install packages

library(rcompanion)
library(sandwich)

This first section reads in the data

anticoagulation <- as.table(cbind(c(4,0,3,3,1,0),c(40,1,15,43,7,14)))
dimnames(anticoagulation) <- 
    list(Type = c("VKA","VKA+antiplatelet","Bridging LMWH/VKA","DOAC","DOAC+antiplatelet","DAPT"),Bleeding = c("Yes","No"))
anticoagulation
##                    Bleeding
## Type                Yes No
##   VKA                 4 40
##   VKA+antiplatelet    0  1
##   Bridging LMWH/VKA   3 15
##   DOAC                3 43
##   DOAC+antiplatelet   1  7
##   DAPT                0 14

Here is the output from the Chi sqaured

(Xsq <- chisq.test(anticoagulation))
## 
##  Pearson's Chi-squared test
## 
## data:  anticoagulation
## X-squared = 3.3883, df = 5, p-value = 0.6404

I also looked at it with a Fisher’s exact test

(Fisher<-fisher.test(anticoagulation,alternative="greater"))
## 
##  Fisher's Exact Test for Count Data
## 
## data:  anticoagulation
## p-value = 0.4959
## alternative hypothesis: greater

I also looked at the pair-wise comparisons

(PT = pairwiseNominalIndependence(anticoagulation,fisher = TRUE,gtest  = FALSE,chisq  = FALSE, digits = 3))