mcorr

Single-figure plot of all correlations between the columns of an array and frequency distributions
3.4K 次下载
更新时间 2012/6/19

查看许可证

%MCORR Multi-plot of all correlations between columns of a matrix
% MCORR (X) plots correlations between all possible combinations of the
% columns of array X, in a single figure. If the first argument is the
% name of a file in the current directory, mcorr reads
% it (including variable names in the first row) as X. Otherwise it is
% assumed that the first argument is an array, in which case consecutive
% numbers will be used as variable names. If there is a second (numeric)
% argument, mcorr will plot only the columns indicated in the second argument.
% The frequency distribution of each variable is plotted in the main
% diagonal with HIST using n/20 bins.
% It is unpractical to try to plot more than, say, 8 variables, since each
% individual plot becomes too small.
%
% OUTPUT= MCORR (X,'sig',ALPHA) calculates the correlation coefficient between
% each pair of columns and, if the correlation is sgnificant at the ALPHA
% level, points are plotted in red and the column numbers, corr. coefficient
% and p-value are returned in the OUTPUT array. Requires Statistical Toolbox
%
% OUTPUT= MCORR (X,...,'corr',CORTYPE) specifies the type of correlation,
% allowed values are 'Pearson' (default), 'Spearman' and 'Kendall'
%
% EXAMPLES:
% mcorr ('myfile')
% mcorr ('myfile',[1:5])
% mcorr (X,[3:6])
% output= mcorr (X,'sig',0.05)
%
% Last modified: Jun. 2012

引用格式

Francisco de Castro (2024). mcorr (https://www.mathworks.com/matlabcentral/fileexchange/10253-mcorr), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2008b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Frequency distributions in main diagonal
Other correlations allowed (Spearman, Kendall)

1.0.0.0

Return Pearson coef. and p
Reduce example image size