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))
#>                           MR2        MR1
#> Mazda RX4         -0.47283660 -0.7310432
#> Mazda RX4 Wag     -0.38011348 -0.4342578
#> Datsun 710        -0.99251648  0.4087690
#> Hornet 4 Drive     0.07181373  0.9131798
#> Hornet Sportabout  0.72281999 -0.3946531
#> Valiant            0.21349037  1.3394187