paK {cdmTools} | R Documentation |
Parallel analysis - dimensionality assessment method
Description
Parallel analysis with column permutation (i.e., resampling) as used in Nájera, Abad, & Sorrel (2021).
It is recommended to use principal components, Pearson correlations, and mean criterion (Garrido, Abad, & Ponsoda, 2013; Nájera, Abad, & Sorrel, 2021).
The parallel analysis based on principal axis factor analysis is conducted using the fa.parallel
function of the psych
R package (Revelle, 2020).
The tetrachoric correlations are efficiently estimated using the sirt
R package (Robitzsch, 2020).
The graph is made with the ggplot2
package (Wickham et al., 2020).
Usage
paK(
dat,
R = 100,
fa = "pc",
cor = "both",
cutoff = "mean",
fm = "uls",
plot = TRUE,
verbose = TRUE,
seed = NULL
)
Arguments
dat |
A N individuals x J items ( |
R |
Number of resampled datasets (i.e., replications) to generate. The default is 100. |
fa |
Extraction method to use. It includes |
cor |
What type of correlations to use. It includes |
cutoff |
What criterion to use as the cutoff. It can be |
fm |
Factoring method to use. It includes |
plot |
Print the parallel analysis plot? Note that the plot might be messy if many variants are requested. The default is |
verbose |
progress. The default is |
seed |
A seed for obtaining consistent results. If |
Value
paK
returns an object of class paK
.
sug.K
The suggested number of attributes for each variant (
vector
).e.values
The sample and reference eigenvalues (
matrix
).plot
The parallel analysis plot. Only if
plot = TRUE
(plot
).specifications
Function call specifications (
list
).
Author(s)
Pablo Nájera, Universidad Pontificia Comillas
Miguel A. Sorrel, Universidad Autónoma de Madrid
Francisco J. Abad, Universidad Autónoma de Madrid
References
Garrido, L. E., Abad, F. J., & Ponsoda, V. (2013). A new look at Horn's parallel analysis with ordinal variables. Psychological Methods, 18, 454-474. https://doi.org/10.1037/a0030005
Nájera, P., Abad, F. J., & Sorrel, M. A. (2021). Determining the number of attributes in cognitive diagnosis modeling. Frontiers in Psychology, 12:614470. https://doi.org/10.3389/fpsyg.2021.614470
Revelle, W. (2019). psych: Procedures for Psychological, Psychometric, and Personality Research. R package version 1.9.12. https://CRAN.R-project.org/package=psych.
Robitzsch, A. (2020). sirt: Supplementary Item Response Theory Models. R package version 3.9-4. https://CRAN.R-project.org/package=sirt.
Wickham, H., et al. (2020). ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. R package version 3.3.2. https://CRAN.R-project.org/package=ggplot2.
Examples
library(GDINA)
dat <- sim30GDINA$simdat
Q <- sim30GDINA$simQ
# In paK, R = 100 is recommended (R = 30 is here used for illustration purposes)
pa.K <- paK(dat = dat, R = 30, fa = "pc", cutoff = c("mean", 95), plot = TRUE, seed = 123)
pa.K$sug.K # Check suggested number of attributes by each parallel analysis variant
pa.K$e.values # Check eigenvalues
pa.K$plot # Show parallel analysis plot