added mychisq_or.R and af_or_calcs.R

This commit is contained in:
Tanushree Tunstall 2021-06-11 13:28:07 +01:00
parent b6df47a0cd
commit 931f8ec2f9
2 changed files with 267 additions and 0 deletions

View file

@ -0,0 +1,13 @@
mychisq_or = function(dst_numeric, mut_numeric){
tab = as.matrix(table(dst_numeric, mut_numeric))
a = tab[2,2]
if (a==0){ a<-0.5}
b = tab[2,1]
if (b==0){ b<-0.5}
c = tab[1,2]
if (c==0){ c<-0.5}
d = tab[1,1]
if (d==0){ d<-0.5}
(a/b)/(c/d)
}