Spearman correlation in Matlab!

149 ビュー (過去 30 日間)
M G
M G 2011 年 10 月 27 日
回答済み: Rithy Khouy 2022 年 8 月 25 日
Hey Matlab users,
If I have two series of data:
a = [1 4 6 3 4 6 7 8]; b [34 56 34 56 79 23 48 28];
and I want to perform a Spearman correlation what would be the proper command in MATLAB? I need both p-value and RHO.
Thanks for your help.
Mehdi

採用された回答

Wayne King
Wayne King 2011 年 10 月 27 日
Hi, If you have the Statistics Toolbox.
a = [1 4 6 3 4 6 7 8];
b = [34 56 34 56 79 23 48 28];
[RHO,PVAL] = corr(a',b','Type','Spearman');

その他の回答 (1 件)

Rithy Khouy
Rithy Khouy 2022 年 8 月 25 日
a = [1 4 6 3 4 6 7 8];
b = [34 56 34 56 79 23 48 28];
[RHO,PVAL] = corr(a',b','Type','Spearman');

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by