比较不同技术之间的相关性

问题描述 投票:0回答:1

1 /给出以下提示,我测试了三种不同的技术(PCR,TECH_A和TECH_B)。这个想法是要看TECH_A和TECH_B与PCR在检测特定基因上的比较。我的意思是如果他们同意。

N等效于“-”(表示负)。例如,第一行说PCR为负TECH_a和tech_A为负,因此它们返回的结果都是负。

> dat
# A tibble: 5 x 4
# Groups:   PCR [2]
  PCR   TECH_A TECH_B CASES
  <chr> <chr>  <chr>  <int>
1 N     -      -          1
2 N     -      +         23
3 N     +      +          8
4 P     -      +          2
5 P     +      +          4

这里是数据:

dat <- 
structure(list(PCR = c("N", "N", "N", "P", "P"), TECH_A = c("-", 
"-", "+", "-", "+"), TECH_B = c("-", "+", "+", "+", "+"), CASES = c(1L, 
23L, 8L, 2L, 4L)), row.names = c(NA, -5L), class = c("grouped_df", 
"tbl_df", "tbl", "data.frame"), na.action = structure(c(`2` = 2L, 
`6` = 6L, `8` = 8L, `10` = 10L, `12` = 12L, `15` = 15L, `18` = 18L, 
`20` = 20L, `22` = 22L, `24` = 24L, `26` = 26L, `28` = 28L, `30` = 30L, 
`31` = 31L, `34` = 34L, `35` = 35L, `38` = 38L, `39` = 39L, `42` = 42L, 
`44` = 44L, `46` = 46L, `48` = 48L, `50` = 50L, `52` = 52L, `54` = 54L, 
`56` = 56L, `58` = 58L, `60` = 60L, `62` = 62L, `64` = 64L, `67` = 67L, 
`69` = 69L, `71` = 71L), class = "omit"), groups = structure(list(
    PCR = c("N", "P"), .rows = list(1:3, 4:5)), row.names = c(NA, 
-2L), class = c("tbl_df", "tbl", "data.frame"), .drop = TRUE))

关于如何将最后两种技术与PCR进行比较,看看它们是否相关的任何想法?

r dplyr logistic-regression
1个回答
0
投票

两个二进制值之间的相关性就像精度,我猜(有很多人同意)。除此之外,您还可以查看误报率,误报率等,以您的情况为准。

[下面我在PCR和Tech A / Tech B之间进行了比较,使用混淆矩阵从本质上对每种技术的统计信息进行了排序,您可以看到Tech A与PCR一致。]]

对于TECH_A首先:

cm = table(rep(dat$PCR,dat$CASES),rep(dat$TECH_A,dat$CASES))
# rename for convenience
rownames(cm) = c("-","+")

             Accuracy : 0.7368        
                 95% CI : (0.569, 0.866)
    No Information Rate : 0.6842        
    P-Value [Acc > NIR] : 0.3062        

                  Kappa : 0.2963        

 Mcnemar's Test P-Value : 0.1138        

            Sensitivity : 0.9231        
            Specificity : 0.3333        
         Pos Pred Value : 0.7500        
         Neg Pred Value : 0.6667        
             Prevalence : 0.6842        
         Detection Rate : 0.6316        
   Detection Prevalence : 0.8421        
      Balanced Accuracy : 0.6282  

然后是B:

cm = table(rep(dat$PCR,dat$CASES),rep(dat$TECH_B,dat$CASES))
rownames(cm) = c("-","+")



Confusion Matrix and Statistics

     -  +
  -  1 31
  +  0  6

               Accuracy : 0.1842          
                 95% CI : (0.0774, 0.3433)
    No Information Rate : 0.9737          
    P-Value [Acc > NIR] : 1               

                  Kappa : 0.0101          

 Mcnemar's Test P-Value : 7.118e-08       

            Sensitivity : 1.00000         
            Specificity : 0.16216         
         Pos Pred Value : 0.03125         
         Neg Pred Value : 1.00000         
             Prevalence : 0.02632         
         Detection Rate : 0.02632         
   Detection Prevalence : 0.84211         
      Balanced Accuracy : 0.58108         

       'Positive' Class : -       
© www.soinside.com 2019 - 2024. All rights reserved.