compare_correlation_coefficients
% This function compares if two correlation coefficients are significantly
% different.
% The correlation coefficients were tansfered to z scores using fisher's r
% to z transformation.
% ref: http://core.ecu.edu/psyc/wuenschk/docs30/CompareCorrCoeff.pdf
%--------------------------------------------------------------------------
% Inputs: (1) r1: correlation coefficient of the first correlation (2) r2:
% correlation coefficient of the second correlation (3) n1: number of
% samples used to compute the first correlation (4) n2: number of samples
% used to compute the second correlation
%--------------------------------------------------------------------------
% Output: (1) p: p value, the probability that H0 (the correlation
% coefficiets are not different) is correct
%--------------------------------------------------------------------------
% Example :
% x = rand(20,1);
% y1= x+rand(20,1)*0.05;
% y2= x+rand(20,1)*0.5;
% r1=corr(x,y1);
% r1=corr(x,y2);
% p = compare_correlation_coefficients(r1,r2,length(x),length(x));
%--------------------------------------------------------------------------
Zitieren als
Sisi Ma (2025). compare_correlation_coefficients (https://www.mathworks.com/matlabcentral/fileexchange/44658-compare_correlation_coefficients), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- AI and Statistics > Statistics and Machine Learning Toolbox > Descriptive Statistics and Visualization > Descriptive Statistics >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.1.0.0 | documentation |
||
1.0.0.0 |