Setting up a CFA

Factor Analysis in R

Jennifer Brussow

Psychometrician

Why a confirmatory analysis?

Benefits of a confirmatory analysis:

  • Explicitly specified variable/factor relationships
  • Testing a theory that you know in advance
  • This is the right thing to publish when you are developing a new measure!
Factor Analysis in R

Path diagram of EFA results

Factor Analysis in R

Using the wrapper function to set up a CFA

EFA_syn <- structure.sem(EFA_model)

EFA_syn
      Path        Parameter Value
 [1,] "MR5->A1"   "F4A1"    NA   
 [2,] "MR5->A2"   "F4A2"    NA   
 [3,] "MR5->A3"   "F4A3"    NA   
 [4,] "MR5->A4"   "F4A4"    NA   
 [5,] "MR5->A5"   "F4A5"    NA   
 [6,] "MR3->C1"   "F3C1"    NA   
 [7,] "MR3->C2"   "F3C2"    NA   
 [8,] "MR3->C3"   "F3C3"    NA   
 [9,] "MR3->C4"   "F3C4"    NA   
[10,] "MR3->C5"   "F3C5"    NA   
[11,] "MR1->E1"   "F2E1"    NA   
...
Factor Analysis in R

Syntax created from the wrapper function

EFA_syn
      Path        Parameter Value
 [1,] "MR5->A1"   "F4A1"    NA   
  • Factor 4 (F4) = Factor MR5 from the EFA
  • Examinees' level of a factor predicts item responses
  • Wrapper function automatically names parameters
  • NA Value = starting value chosen at random
Factor Analysis in R

Creating CFA syntax from your theory

# Set up syntax specifying which items load onto each factor
theory_syn_eq <- "
AGE: A1, A2, A3, A4, A5     #Agreeableness
CON: C1, C2, C3, C4, C5     #Conscientiousness
EXT: E1, E2, E3, E4, E5     #Extraversion
NEU: N1, N2, N3, N4, N5     #Neuroticism
OPE: O1, O2, O3, O4, O5     #Openness
"
  • Short, memorable factor names
  • Factor name followed by colon
  • Items in a comma-separated list
theory_syn <- cfa(text = theory_syn_eq, reference.indicators = FALSE)
Factor Analysis in R

Let's create some syntax!

Factor Analysis in R

Preparing Video For Download...