15.6 Factor Scores

We could obtain Factor scores for an individual based on only the X’s that highly load on that factor Essentially here, FA would identify subgroups of correlated variables.

In our hypothetical example where after rotation x1 and x2 loaded highly on factor 2, and x3-5 loaded highly on factor 1, we could calculate factor scores as

  • factor score 2 for person \(i\) = \(x_{i1} + x_{i2}\)
  • factor score 3 for person \(i\) = \(x_{i3} + x_{i4} + x_{i5}\)

In some simple applications, this approach may be sufficient.

More commonly, we will use a regression procedure to compute factor scores. This method accounts for the correlation between the \(x_{i}\)’s and uses the factor loadings \(l_{ij}\) to calculate the factor scores.

  • Can be used as dependent or independent variables in other analyses
  • Can be generated by adding the scores="regression" option to factanal(), or scores=TRUE in principal()
  • Each record in the data set with no missing data will have a corresponding factor score.
    • principal() also has a missing argument that if set to TRUE it will impute missing values.
fa.ml.varimax <- factanal(stan.dta, factors=2, rotation="varimax", scores="regression")
summary(fa.ml.varimax$scores)
##     Factor1            Factor2        
##  Min.   :-2.32732   Min.   :-2.79312  
##  1st Qu.:-0.72413   1st Qu.:-0.54362  
##  Median : 0.09196   Median :-0.02376  
##  Mean   : 0.00000   Mean   : 0.00000  
##  3rd Qu.: 0.70603   3rd Qu.: 0.65339  
##  Max.   : 2.43371   Max.   : 2.18992
head(fa.ml.varimax$scores)
##          Factor1      Factor2
## [1,] -1.49174313  0.003612941
## [2,] -0.26254721  1.090864733
## [3,]  0.55516045  0.631119886
## [4,] -1.21028676 -1.281240452
## [5,] -0.04852211 -1.575691468
## [6,] -0.53768770  0.661138335
#library(ggforitfy)
autoplot(fa.ml.varimax) # see vignette for more info. Link at bottom

To merge these scores back onto the original data set providing there is no missing data you can use the bind_cols() function in dplyr.

data.withscores <- bind_cols(data, data.frame(fa.ml.varimax$scores))
kable(head(data.withscores))
X1 X2 X3 X4 X5 Factor1 Factor2
-0.8236763 -0.1210726 -0.5970760 -1.4752693 -1.2355056 -1.4917431 0.0036129
1.4013214 1.0733569 0.7681035 -0.0509857 0.0180061 -0.2625472 1.0908647
0.2781468 0.7574632 0.6445954 0.6765583 0.7532815 0.5551604 0.6311199
0.1819544 -1.3228227 -1.0847105 -0.9574722 -1.3719843 -1.2102868 -1.2812405
-1.6147171 -1.4254411 0.3519605 -0.0124497 -0.2523487 -0.0485221 -1.5756915
0.8251470 0.6245702 -1.2923348 -0.6345633 -0.0885945 -0.5376877 0.6611383