IniziaInizia gratis

Plotting differences in persons' factor scores

Factor loadings aren't the only parameters that differ between EFA and CFA results. Individuals' factor scores also differ when they are calculated from the EFA or CFA parameters. To illustrate this, we'll look at how factor scores for individuals in the bfi_EFA dataset differ when they are calculated from the EFA model versus from the CFA model by examining those scores' density plots.

Questo esercizio fa parte del corso

Factor Analysis in R

Visualizza il corso

Istruzioni dell'esercizio

  • First, save the scores from the scores named list element from the EFA_model object into a new object. Since this model was created from the bfi_EFA dataset, the factor scores are from that dataset.
  • Next, use fscores() to calculate and extract individuals' factor scores using the CFA model object with the same bfi_EFA dataset.
  • Finally, use the plot() and lines() functions to graph the densities of the individuals' factor scores on the first factor.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Extracting factor scores from the EFA model
EFA_scores <- EFA_model$___

# Calculating factor scores by applying the CFA parameters to the EFA dataset
CFA_scores <- fscores(EFA_CFA, data = ___)

# Comparing factor scores from the EFA and CFA results from the bfi_EFA dataset
___(density(___[,1], na.rm = TRUE), 
    xlim = c(-3, 3), ylim = c(0, 1), col = "blue")
___(density(___[,1], na.rm = TRUE), 
    xlim = c(-3, 3), ylim = c(0, 1), col = "red")
Modifica ed esegui il codice