random.polychor.pa: A Parallel Analysis With Polychoric Correlation Matrices
The Function performs a parallel analysis using simulated polychoric correlation matrices. The nth-percentile of the
eigenvalues distribution obtained from both the randomlygenerated and the real data polychoric correlation matrices is
returned. A plot comparing the two types of eigenvalues (real and simulated) will help determine the number of real
eigenvalues that outperform random data. The function is based on the idea that if real data are non-normal and the polychoric
correlation matrix is needed to perform a Factor Analysis, then the Parallel Analysis method used to choose a non-random number
of factors should also be based on randomly generated polychoric correlation matrices and not on Pearson correlation
matrices. Version 1.1.1, fixed a minor bug in the regarding the estimated time needed to complete the simulation. Also in this
version, the function is now able to manage supplied data.matrix in which variables representing factors (i.e.,
variables with ordered categories) are present and may cause an error when the Pearson correlation matrix is calculated.
Version 1.1.2 simply has updated the function that calculates the polychoric correlation matrix due to changes in the psych()
package. Version 1.1.3 tackles two problems signalled by users: 1) the possibility to make available the results of simulation
for plotting them in other software. Now the random.polychor.pa will show, upon request, all the data used in the scree-plot.
2) The function polichoric() of the psych() package does not handle data matrices that include 0 as possible category and
will cause the function to stop with error. So a check for the detection of the 0 code within the provided data.matrix is now
added and will cause the random.polychor.pa function to stop with a warning message. In version 184.108.40.206 a paramether was added
(diff.fact) in order to simulate random dataset with the same probability of observing each category for each variable as that
observed in the provided (empirical) dataset. Finally the search for zeroes within the provided datafile was removed, so data
with zeroes are now accepted. In version 220.127.116.11 a check for the range of quantile (beteen 0 and 1) was added.