How can I calculate the 95% confidence interval for spearman correlation values?
42 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giacomo Bertazzoli
am 4 Jun. 2020
Kommentiert: Giacomo Bertazzoli
am 8 Jun. 2020
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 Kommentare
Akzeptierte Antwort
Jeff Miller
am 5 Jun. 2020
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})
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Hypothesis Tests finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!