Aan de slagGa gratis aan de slag

Fix the Latent Heywood Model

In the last exercise, you found that the adoption survey had a correlation > 1 on the latent variable. You should fix the Heywood case by collapsing the two latent variables into one latent variable. Then you should analyze and summarize the model to explore if merging these two factors into one has solved the problematic correlation.

Deze oefening maakt deel uit van de cursus

Structural Equation Modeling with lavaan in R

Cursus bekijken

Oefeninstructies

  • Change the model to create only one goodstory factor that is measured by all six manifest variables in the adoptsurvey dataset.
  • Analyze the model with the cfa() function to ensure there are no error messages.
  • Run the summary() for the model to view the final model fit.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Look at the data
head(adoptsurvey)

# Edit the original model 
adopt.model <- 'goodstory =~ pictures + background + loveskids
inperson =~ energy + wagstail + playful'

# Analyze the model
adopt.fit <- cfa(model = ___, data = adoptsurvey)

# Look for Heywood cases
summary(___, standardized = TRUE, fit.measures = TRUE)
Code bewerken en uitvoeren