compare_correlation​_coefficients

Version 1.1.0.0 (1.47 KB) by Sisi Ma
This function compare if two correlation coefficients are significantly different.
1.4K Downloads
Updated 11 Dec 2013

View License

% 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));
%--------------------------------------------------------------------------

Cite As

Sisi Ma (2024). compare_correlation_coefficients (https://www.mathworks.com/matlabcentral/fileexchange/44658-compare_correlation_coefficients), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

documentation

1.0.0.0