added mychisq_or.R and af_or_calcs.R
This commit is contained in:
parent
b6df47a0cd
commit
931f8ec2f9
2 changed files with 267 additions and 0 deletions
13
scripts/functions/mychisq_or.R
Normal file
13
scripts/functions/mychisq_or.R
Normal 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)
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue