How can I calculate the 95% confidence interval for spearman correlation values?
42 ビュー (過去 30 日間)
古いコメントを表示
Giacomo Bertazzoli
2020 年 6 月 4 日
コメント済み: Giacomo Bertazzoli
2020 年 6 月 8 日
I am trying to get the 95% CI of the spearman correlation of 2 vectors, but I can't figure out how obtain that with the function
corr(x1,x2,'Type','Spearman', 'tail', 'both');
Does anyone know any built-in fuction to calculate that?
0 件のコメント
採用された回答
Jeff Miller
2020 年 6 月 5 日
I don't think there are formulas for that but you can estimate it with bootstrapping:
mycorr = @(x1,x2) corr(x1,x2,'Type','Spearman', 'tail', 'both')
nIterations = 10000;
[lower, upper] = bootci(nIterations,{mycorr,x1,x2})
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Hypothesis Tests についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!