Description Usage Arguments Details Value Note Author(s) References See Also Examples
Creates an object of class PA using one of the PA functions. It performs a parallel analysis of continuous,
orderd (including dichotomous/binary as a special case) or mixed type of data associated with a principal components
analysis. Polychoric correlations among ordered variables, Pearson correlations among continuous variables and
polyserial correlation between mixed type variables (one ordered and one continuous) are used. Whenever the use of
polyserial or polychoric correlations yields a non positive definite correlation matrix, the resulting matrix is
transformed into the nearest positive definite matrix by nearcor
.
1 2 |
dataMatrix |
|
percentiles |
vector of percentiles to report. |
nReplicates |
number of simulations to produce for estimating the eigenvalues distribution under independence. |
type |
Data type: |
use |
Missing value handling method: If |
algorithm |
string specifying the correlation estimation algorithm. Polychoric correlation estimation method:
|
This function generates an object of (S3) class "PA"
by using one of the four support functions
(CalculatePAContinuous
, CalculatePAOrdered
, CalculatePABinary
,
CalculatePAMixed
). As noted by Presaghi & Desimoni (2011), when using the parallel analysis approach to
select the number of components to retain, observed and simulated correlation matrices ought to be of the same kind.
The purporse with this package is to provide a more flexible framework to work with parallel anaylisis data.
For the case where all variables are ordered polytomous the C++
function polychoric
or the function "polychor"
from package "polycor"
may be used.
Pearson correlation from "cor"
function is used; finally, for sets that mix variables of both types, the "polycor"
package is
used. Furthermore, objects of class "PA"
retain the eigenvalues for simulated correlation matrices allowing the
user to avoid multiple simulations for changing certain parameters such as the specific qunatile used to decide on the
retained number of components; also some missing observations may be handled by the "use"
parameter.
An object of class "PA"
with the following:
observed |
|
percentiles |
|
simulatedEigenValues |
|
The algorithm "polychoric"
is only implemented for binary/dichotomous and ordered polytomous data. When
mixed type data are used only "polycor"
is currently available.
Carlos A. Arias caariasr22@gmail.com and Victor H. Cervantes herulor@gmail.com
Horn, J. L. (1965). A rationale and test for the number of factors in factor analysis. Psychometrika, 30, 179–185.
Glorfeld, L. W. (1995). An Improvement on Horn's Parallel Analysis Methodology for Selecting the Correct Number of Factors to Retain. Educational and Psychological Measurement, 55(3), 377–393.
CalculatePAContinuous
, CalculatePAOrdered
, CalculatePABinary
,
CalculatePAMixed
, print.PA
, plot.PA
, coef.PA
,
quantile.PA
, CountEigen.PA
, Check.PA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # # NOT RUN
# # Run Parallel Analysis for binary data conforming to the Rasch model
# # using the polycor package
# data(simRaschData)
# binaryRaschPA <- PA(simRaschData, percentiles = c(0.95, 0.99), nReplicates = 200,
# type = "binary")
# print(binaryRaschPA)
# # Run Parallel Analysis for binary data conforming to the Rasch model
# # using the polychoric C++ function
data(simRaschData)
binaryRaschPA <- PA(simRaschData, percentiles = c(0.95, 0.99), nReplicates = 200,
type = "binary", algorithm = "polychoric")
print(binaryRaschPA)
# # NOT RUN
# # Run Parallel Analysis for binary data conforming to the 2PL model
# # using the polycor package
# data(sim2plData)
# binary2plPA <- PA(sim2plData, percentiles = c(0.95, 0.99), nReplicates = 200,
# type = "binary")
# print(binary2plPA)
# # Run Parallel Analysis for binary data conforming to the 2PL model
# # using the polychoric C++ function
data(sim2plData)
binary2plPA <- PA(sim2plData, percentiles = c(0.95, 0.99), nReplicates = 200,
type = "binary", algorithm = "polychoric")
print(binary2plPA)
# # NOT RUN
# # Run Parallel analysis for ordered polytomous data using the polycor package
# data(Science)
# Science[, ] <- lapply(Science, as.ordered)
# orderedPA <- PA(Science, percentiles = c(0.90, 0.99), nReplicates = 200,
# type = "ordered")
# print(orderedPA)
# # Run Parallel analysis for ordered polytomous data using the polychoric C++ function
data(Science)
Science[, ] <- lapply(Science, as.ordered)
orderedPA <- PA(Science, percentiles = c(0.90, 0.99), nReplicates = 200,
type = "ordered", algorithm = "polychoric")
print(orderedPA)
# # NOT RUN
# # Run Parallel analysis of mixed ordered and continuous data
# data(mixedScience)
# mixedPA <- PA(mixedScience, percentiles = c(0.90, 0.99), nReplicates = 200,
# type = "mixed")
# print(mixedPA)
# # Run Parallel analyis of numeric data (Iris)
data(iris)
continuousPA <- PA(iris[, -5], percentiles = c(0.90, 0.99), nReplicates = 200,
type = "continuous", algorithm = "pearson")
print(continuousPA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.