image thumbnail

Parallel Analysis (PA) to for determining the number of components to retain from PCA.

version 1.0.0.0 (1.96 KB) by Hanan Shteingart
component is retained if the associated eigenvalue is bigger than the 95th of the distribution of ei

857 Downloads

Updated 10 Jan 2014

View License

% Parallel Analysis (PA) to for determining the number of components to retain from PCA. component is retained if the associated eigenvalue is bigger than the 95th of the distribution of eigenvalues derived from the random data.
% Syntax:
% ======
% pa_test(x, nShuffle, alpha, princomp_parameters[ ])
% x - the data matrix (nXp where n is the number of observation and p is dimension of each observation)
% nShuffle - number of shuffles. optional, default = 100
% alpha - significance level. optional, default 0.05
% princomp_parameters - parameters to pass to the princomp function (see help princomp). optional, default ={true,'Centered',false}

% Background:
% ==========
% From Wikipedia: http://en.wikipedia.org/wiki/Factor_analysis
% Horn's Parallel Analysis (PA):
% A Monte-Carlo based simulation method that compares the observed eigenvalues with those obtained from uncorrelated normal variables.
% A factor or component is retained if the associated eigenvalue is bigger than the 95th of the distribution of eigenvalues derived from the random data.
% PA is one of the most recommendable rules for determining the number of components to retain, but only few programs include this option.

% References:
% * Ledesma, R.D.; Valero-Mora, P. (2007). "Determining the Number of Factors to Retain in EFA: An easy-to-use computer program for carrying out Parallel Analysis". Practical Assessment Research & Evaluation 12 (2): 1–11.

Cite As

Hanan Shteingart (2021). Parallel Analysis (PA) to for determining the number of components to retain from PCA. (https://www.mathworks.com/matlabcentral/fileexchange/44996-parallel-analysis-pa-to-for-determining-the-number-of-components-to-retain-from-pca), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

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

Start Hunting!