mirror of
https://github.com/agdamsbo/daDoctoR.git
synced 2024-11-22 03:40:23 +01:00
u
This commit is contained in:
parent
46328c1f13
commit
c84b971ab7
@ -15,22 +15,22 @@ rep_epi_tests<-function(gold,test,data){
|
|||||||
require(epiR)
|
require(epiR)
|
||||||
|
|
||||||
d<-data
|
d<-data
|
||||||
test<-d[,c(test)]
|
tst<-d[,c(test)]
|
||||||
|
|
||||||
gs<-d[,c(gold)]
|
gs<-d[,c(gold)]
|
||||||
|
|
||||||
ls<-list()
|
ls<-list()
|
||||||
|
|
||||||
if (length(gold)==1){
|
if (length(gold)==1){
|
||||||
for (i in 1:ncol(test)){
|
for (i in 1:ncol(tst)){
|
||||||
t<-table(test[,i],gs)
|
t<-table(tst[,i],gs)
|
||||||
rval <- epi.tests(t, conf.level = 0.95)
|
rval <- epi.tests(t, conf.level = 0.95)
|
||||||
n<-names(test)[i]
|
n<-names(tst)[i]
|
||||||
ls[[i]]<-list(n,rval)
|
ls[[i]]<-list(n,rval)
|
||||||
}}
|
}}
|
||||||
else {
|
else {
|
||||||
for (i in 1:ncol(gs)){
|
for (i in 1:ncol(gs)){
|
||||||
t<-table(test,gs[,i])
|
t<-table(tst,gs[,i])
|
||||||
rval <- epi.gss(t, conf.level = 0.95)
|
rval <- epi.gss(t, conf.level = 0.95)
|
||||||
n<-names(gs)[i]
|
n<-names(gs)[i]
|
||||||
ls[[i]]<-list(n,rval)
|
ls[[i]]<-list(n,rval)
|
||||||
|
Loading…
Reference in New Issue
Block a user