Skip to contents

factor_scores() extracts the factor scores from objects returned by psych::fa(), factor_analysis(), or psych::omega()

Usage

factor_scores(x, ...)

Arguments

x

An object returned by psych::fa(), factor_analysis(), or psych::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.2609328 -1.04874373
#> Mazda RX4 Wag     -0.2439731 -0.68178441
#> Datsun 710        -0.9810004 -0.15839038
#> Hornet 4 Drive    -0.1392219  1.00259255
#> Hornet Sportabout  0.7360517  0.01341681
#> Valiant           -0.1072357  1.53465630