This Computational Provenance Record documents the statistical computing environment, software dependencies, computational provenance, and bibliographic references associated with the RAISINS Exploratory Factor Analysis module. It is intended to support computational reproducibility and software transparency. Detailed statistical methodology, mathematical derivations, and user guidance are provided separately in the official module documentation.
Any issues or updates required please comment here
Avoids imaginary-eigenvalue failures on near-singular correlation matrices
Factor scores
scores = "Bartlett"
Exportable as CSV
Salient loading threshold
abs(loading) >= 0.4
Used only for grouping variables under a factor when reporting reliability and written interpretation; it does not alter the fitted model
Display precision
User-set, 1-5 decimal places (default 3)
Display only; never affects computation
5 R Code for Key Analytical Steps
The code blocks below reproduce every statistical quantity reported by the RAISINS Exploratory Factor Analysis module, using the bfi dataset (25 personality self-report items, 2,800 respondents) supplied with the psych package. Only complete cases are retained, giving 2,436 respondents. No RAISINS-specific code or data is required.
# Kaiser-Meyer-Olkin measure of sampling adequacy (overall and per variable)kmo <-KMO(R)kmo$MSA # overall MSAkmo$MSAi # per-variable MSA# Bartlett's test of sphericitybart <-cortest.bartlett(R, n =nrow(Xs))bart$chisq; bart$df; bart$p.value
5.3 Determining the Number of Factors
# Kaiser criterion: eigenvalues of the correlation matrix greater than 1ev <-eigen(R)$valuessum(ev >1)# Parallel analysis (Horn, 1965)pa <-fa.parallel(R, n.obs =nrow(Xs), fa ="both", plot =FALSE)pa$nfact# Very Simple Structure and Velicer's Minimum Average Partialvss <-VSS(Xs, n =8, rotate ="varimax", fm ="pa", plot =FALSE, SMC =FALSE)which.min(vss$map) # factor count minimising MAPvss$vss.stats$cfit.1# VSS complexity 1vss$vss.stats$cfit.2# VSS complexity 2
5.5 Loadings, Communalities, Uniqueness and Variance Explained
L <-as.matrix(fit$loadings) # rotated factor loadingsfit$communality # h2, variance of each variable explainedfit$uniquenesses # u2 = 1 - h2# Variance explained per factor, and cumulativelyprop_var <-colSums(L^2) /nrow(L)cum_var <-cumsum(prop_var)
5.6 Reliability of Each Factor
# Each variable is assigned to the factor carrying its largest loading,# provided that loading is at least 0.4dominant <-apply(abs(L), 1, function(z)if (max(z) >=0.4) which.max(z) elseNA_integer_)alphas <-sapply(seq_len(nf), function(f) { items <-rownames(L)[which(dominant == f)]if (length(items) <2) return(NA_real_) # alpha needs >= 2 items psych::alpha(X[, items, drop =FALSE], check.keys =TRUE)$total$raw_alpha})alphas
fit$dof # degrees of freedomfit$rms # root mean square residual (RMSR)fit$RMSEA # RMSEA and its confidence boundsfit$TLI # Tucker-Lewis indexfit$STATISTIC; fit$PVAL # chi-square and its p-valuefit$BICfit$model # reproduced (model-implied) correlation matrixfit$residual # observed minus reproduced
5.9 Factor Scores
scores <- fit$scores # Bartlett factor scores, one row per observationhead(scores)
Rotation criteria other than varimax are fitted by the gradient-projection algorithms in GPArotation. These are iterative and are not guaranteed to return the factors in the same column order on repeated fits of identical data; the factors themselves, their loadings and the variance they explain are unaffected. Within a single RAISINS analysis every table, plot and written interpretation is generated from one shared fitted model, so all reported output is mutually consistent. When run-to-run stability of factor numbering is required, varimax should be used, or factors should be identified by their salient variables rather than by index.
RAISINS uses R for all its statistical computations. Every package used to generate major results is listed and demonstrated with examples, so results can be reproduced independently. These results are then organized and formatted on the RAISINS website along with visualisation to make them easier to use and interpret. RAISINS also has its own custom-built statistical tools for managing workflows, validating results, and generating reports. Details of these are not fully covered here, they’re shared with outside researchers only on request, and are subject to licensing terms.
7 Package References
R Core Team. (2025). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/
Revelle, W. (2025). psych: Procedures for Psychological, Psychometric, and Personality Research (R package version 2.6.5). Northwestern University, Evanston, Illinois. https://doi.org/10.32614/CRAN.package.psych
Bernaards, C. A., & Jennrich, R. I. (2005). Gradient Projection Algorithms and Software for Arbitrary Rotation Criteria in Factor Analysis. Educational and Psychological Measurement, 65(5), 676-696. https://doi.org/10.1177/0013164404272507
Kaiser, H. F. (1974). An index of factorial simplicity. Psychometrika, 39(1), 31-36. https://doi.org/10.1007/BF02291575
Bartlett, M. S. (1951). The effect of standardization on a chi-square approximation in factor analysis. Biometrika, 38(3/4), 337-344. https://doi.org/10.2307/2332580
Horn, J. L. (1965). A rationale and test for the number of factors in factor analysis. Psychometrika, 30(2), 179-185. https://doi.org/10.1007/BF02289447
Velicer, W. F. (1976). Determining the number of components from the matrix of partial correlations. Psychometrika, 41(3), 321-327. https://doi.org/10.1007/BF02293557
Revelle, W., & Rocklin, T. (1979). Very Simple Structure: An alternative procedure for estimating the optimal number of interpretable factors. Multivariate Behavioral Research, 14(4), 403-414. https://doi.org/10.1207/s15327906mbr1404_2
Cronbach, L. J. (1951). Coefficient alpha and the internal structure of tests. Psychometrika, 16(3), 297-334. https://doi.org/10.1007/BF02310555
Allaire, J. J., Xie, Y., Dervieux, C., McPherson, J., Luraschi, J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W., & Iannone, R. (2026). rmarkdown: Dynamic Documents for R (R package version 2.31). https://github.com/rstudio/rmarkdown