在 Matlab 中调整多重比较的 p 值
我有一个 p 值元胞数组,必须针对多重比较进行调整。我怎样才能在Matlab中做到这一点?我找不到内置函数。
在RI中会做:
data.pValue_adjusted = p.adjust(data.pValue, method='bonferroni')
Matlab有类似的功能吗?理想情况下,执行不同的调整方法(Bonferroni、Benjamini-Hochberg、FDR ...)?
I have a cell array of p-values that have to be adjusted for multiple comparisons. How can I do that in Matlab? I can't find a built-in function.
In R I would do:
data.pValue_adjusted = p.adjust(data.pValue, method='bonferroni')
Is there a similiar function for Matlab? Ideally one that performs different adjustment methods (Bonferroni, Benjamini-Hochberg, FDR ...)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
如果您有 Bioinformatics Toolbox,则可以使用 MAFDR 函数来计算调整后的 p 值错误发现率。
If you have Bioinformatics Toolbox, you can use MAFDR function to calculate p-values adjusted by False Discovery Rate.
对于没有生物信息学工具箱的人来说,FDR(错误发现率)方法也有很好的描述 此处,它还提供了 fdr 脚本的链接。
For people without the Bioinformatics Toolbox, the FDR (False Discovery Rate) method is also very nicely described here, it also provides a link with an fdr script.
R 的
p.adjust
函数的 MATLAB/Octave 实现现已推出免责声明:我是这个包的作者。
A MATLAB/Octave implementation of R's
p.adjust
function is available here. It can perform p-value adjustment for multiple comparisons with the following methods, equivalent to their R counterparts:Disclaimer: I'm the author of this package.
此提交可能就是您的情况寻找,但它只实现了 Bonferroni-Holm 方法。
您必须在 FEX 中搜索与其他校正方法类似的解决方案。
也就是说,统计工具箱具有 MULTCOMPARE 方法,专为多重比较测试而设计,但它不返回校正的 p 值。这是一个例子:
This submission is probably what you are looking for, but it only implements the Bonferroni-Holm method.
You would have to search the FEX for similar solutions to the other correction methods..
That said the Statistics Toolbox has the MULTCOMPARE method which is designed for multiple comparison tests, though it does not return the corrected p-values. Here is an example:
查看使用 Bonferroni 校正的 T 检验 以及 Matlab 文件交换中的相关文件。
我希望这有帮助。
Have a look at T-test with Bonferroni Correction and related files in the Matlab File-exchange.
I hope this helps.
另请参阅 http://uk.mathworks.com /matlabcentral/fileexchange/28303-bonferroni-holm- Correction-for-multiple-comparisons 和
https://en.wikipedia.org/wiki/Holm%E2%80%93Bonferroni_method 作为背景。
See also http://uk.mathworks.com/matlabcentral/fileexchange/28303-bonferroni-holm-correction-for-multiple-comparisons and
https://en.wikipedia.org/wiki/Holm%E2%80%93Bonferroni_method for background.