Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R-统计-如何知道两对值是否与两个数据集显著不同(=相关的异常值)_R_Statistics_Correlation_Outliers - Fatal编程技术网

R-统计-如何知道两对值是否与两个数据集显著不同(=相关的异常值)

R-统计-如何知道两对值是否与两个数据集显著不同(=相关的异常值),r,statistics,correlation,outliers,R,Statistics,Correlation,Outliers,首先,对标题感到抱歉。因为我对统计学很在行,所以知道如何表达我的观点是相当复杂的 也就是说,我会尽量说清楚。谢谢你的耐心! 以下是一个示例数据: dput(test) structure(list(coords = c("chr11:71478469-71480755", "chr11:72233163-72233655", "chr11:72237796-72238263", "chr11:72688537-7269275

首先,对标题感到抱歉。因为我对统计学很在行,所以知道如何表达我的观点是相当复杂的

也就是说,我会尽量说清楚。谢谢你的耐心! 以下是一个示例数据:

dput(test)
structure(list(coords = c("chr11:71478469-71480755", "chr11:72233163-72233655", 
"chr11:72237796-72238263", "chr11:72688537-72692753", "chr11:72688537-72693325", 
"chr11:73390921-73392211"), dPSI.BM_PrePB = c(-0.211854387676934, 
0.291806579364004, 0.333357771512903, -0.314633537078126, 0.27350910457179, 
0.263596043484295), dPSI.BM_Bact = c(-0.326793349890209, 0.287308483987104, 
0.332897018970844, 0.225803052051341, -0.226736267092175, 0.262209354876416
)), row.names = 825:830, class = "data.frame")
我的完整数据大约有4400行

所以我需要知道两个数据集是否相关(示例数据的dPSI.BM_PrePB列和dPSI.BM_Bact列)。下面是我的两个真实数据集的摘要

 summary(mergeboth$dPSI.BM_PrePB)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
-0.94914 -0.32776  0.21163  0.01302  0.31650  0.94582

 summary(mergeboth$dPSI.BM_Bact)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
-0.96366 -0.32977  0.21163  0.01103  0.31833  0.95622 
我做了pearson关联,很明显我的两个数据集是相关的,我还用散点图将其可视化:

现在我的问题是:我需要提取少数几个“异常值”(在我的4400个样本中,似乎远远少于100个),因为在另一项研究中,它具有生物学影响。我在想一种方法来比较两个值,以得到那些明显不同的值,但我不能把我的想法放在它周围。我只是不知道怎么做。 我也在许多主题中看到,检索异常值很复杂(例如,可能需要设置阈值),所以我不能从相关性分析开始,对吗? 我知道我们可以测试两个群体的平均值,但我对平均值不感兴趣,我对精确值感兴趣,因为它们明显不遵循与其他事件相同的行为

非常感谢您的建议。 祝你今天愉快!:)


艾尔莎

cooks.距离
会给你回归的优势点。但这个问题似乎更多的是关于统计的问题,而不是关于R代码的问题。也许发到?非常感谢!我将对此进行探讨。:)