
Extract factor scores from Factor Analysis (EFA) or Omega
Source:R/factor_scores.R
factor_scores.Rdfactor_scores() extracts the factor scores from objects returned by
psych::fa(), factor_analysis(), or psych::omega()
Arguments
- x
An object returned by
psych::fa(),factor_analysis(), orpsych::omega().- ...
Currently unused.
Value
A data frame with the factor scores. It simply extracts the $scores
element from the object and converts it into a data frame.
Examples
data(mtcars)
out <- factor_analysis(mtcars[, 1:7], n = 2)
head(factor_scores(out))
#> MR1 MR2
#> Mazda RX4 -0.47283644 -0.7310436
#> Mazda RX4 Wag -0.38011338 -0.4342580
#> Datsun 710 -0.99251649 0.4087686
#> Hornet 4 Drive 0.07181356 0.9131800
#> Hornet Sportabout 0.72282001 -0.3946528
#> Valiant 0.21349011 1.3394191