Create a Zero df Model
In the first chapter, we created a model of text-speed from the HolzingerSwineford1939
dataset with six manifest variables x4
, x5
, x6
, x7
, x8
, x9
. Create a model of only reading comprehension with x4
, x5
, and x6
.
This model should have zero degrees of freedom because it is not identified, as we are estimating as many parameters as we have options with only three manifest variables. Analyze the model to find zero degrees of freedom. lavaan
and the HolzingerSwineford1939
dataset have been loaded for you.
This exercise is part of the course
Structural Equation Modeling with lavaan in R
Exercise instructions
- Name your model
text.model
and your latent variabletext
. - Use variables
x4
,x5
, andx6
as the manifest variables. - Use the
cfa()
function to analyze the model. - Use the
summary()
function to view the degrees of freedom.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create your text model specification
text.model <- '___'
# Analyze the model and include data argument
text.fit <- cfa(___)
# Summarize the model
summary(___, standardized = TRUE, fit.measures = TRUE)