-
Notifications
You must be signed in to change notification settings - Fork 0
/
Micro.R
22 lines (18 loc) · 1 KB
/
Micro.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
TEST <- TBI_test_auto_allp_TBIgenJW_test(path = "E:/Julian_simulations/MICRO_MICRO/output1568926112", scenario = 0, nloci = 10, nalleles = 10)
MICRO <- TEST
m_1 <- lapply(MICRO, function(x) confusion_mat(x[1:30], 1))
m_2 <- lapply(MICRO, function(x) confusion_mat(x[31:60], 2))
m_3 <- lapply(MICRO, function(x) confusion_mat(x[61:90], 3))
m_7 <- lapply(MICRO, function(x) confusion_mat(x[91:120], 7))
m_8 <- lapply(MICRO, function(x) confusion_mat(x[121:150], 8))
m_13 <- lapply(MICRO, function(x) confusion_mat(x[151:180], 13))
m_combine_positions <- mapply(rbind, m_1, m_2, m_3, m_7, m_8, m_13, SIMPLIFY=FALSE)
#####################################################################################
meansfpr <- sapply(m_combine_positions, function(x) mean(x$FPR))
sdfpr <- sapply(m_combine_positions, function(x) sd(x$FPR))
meansfnr <- sapply(m_combine_positions, function(x) mean(x$FNR))
sdfnr <- sapply(m_combine_positions, function(x) sd(x$FNR))
meansfpr
sdfpr
meansfnr
sdfnr