elfs provides a straightforward and user-friendly way to evaluate and estimate latent factor scores for psychological scales (redacted for review, 2026), attempting to lower the “barrier to entry” for researchers considering using latent factor scores in their analyses. By providing a data frame and a vector of column names, researchers can generate the following output to evaluate their scale:

The full generated list includes these objects:
- flowchart: the primary output as depicted above
- lfs: a matrix containing estimated latent factor scores
- model: the lavaan model object
- summary: the summary of the lavaan model object, with fit statistics, R-squared values, and standardized scores specified
- modind: a sorted list of modification indices for the model
- dynamic: an output object from the dynamic package, if requested
- fit, rel, tau, corr, meas_invar: HTML table versions of the tables in flowchart from which values can be copy and pasted
- model_group, lfs_group: if measurement invariance testing is requested, lists containing lavaan model objects and estimated latent factor scores corresponding with configural, weak, strong, and strict invariance tests
By simplifying the inputs required to generate latent factor models and highlighting validity and reliability indices, we hope to encourage users to report more detailed information about their scales (beyond Cronbach’s α) and make deliberate choices regarding their scoring method. See the vignettes for more detail on the input options and interpretation of the output.
Installation
You can install the development version of elfs from GitHub with:
# install.packages("pak")
pak::pak("SarcylY/elfs")or
# install.packages("devtools")
devtools::install_github("SarcylY/elfs")Example
For detailed examples (and example output), please refer to our vignettes below (depending on the kind of model desired):
-
vignette("NeedforCognition")- One-factor model
- Measurement invariance
- Dynamic fit indices
-
vignette("ShortDarkTriad")- Multi-factor model
- Ordinal measured variables
- Bi-factor model
Credits and References
Hester, N., Yee, S., & McNeish, D. (2026). elfs: An R Package to Promote the Intentional Selection of Scoring Method for Psychological Scales [under review].
Hex sticker design: Neil Hester & Marianne Oyama
Hex sticker illustration: Marianne Oyama
