Model Structure
1. Model Structure
With multiple latent variables, you can begin to build complex models, and this section will cover more model syntax to build your skills.2. Multifactor Model Estimation
When you create a two-factor model, you might expect it to look like the picture here, as you've only specified that the latent variables individually each predict the three manifest variables.3. Multifactor Model Estimation
However, the model will actually be estimated with the correlation between latent variables. By default, lavaan adds a covarying relationship between any predictor variables. Remember that the latent variables are thought to predict the scores on the manifest variables. These are often called exogenous variables, while the variables that are being predicted are called endogenous variables. These terms are not synonymous with the type of variable, as we can use latent variables to predict each other. Let's look at the output, as it contains key hints on how to specify direct prediction, instead of automatic correlation between latents.4. Summary Output
First, under latent variables, we now have two sections, each denoting the latent variable predicting the manifest variables, and their corresponding loadings. You will see the equals tilde in the output, which matches the model specification.5. Summary Output (2)
A new section will appear with multiple latent or exogenous variables under Covariances. In the Estimate column, the covariance will be listed. Covariance is the amount by which two variables change together but it's often hard to interpret because the scale is not standardized. Using the standardized solution under standardized all shows you the correlation between latent variables, which is easier to interpret. This correlation, or 0.46, indicates that these variables overlap by about 20%, which is the correlation squared. We do not want these numbers to get too close to 1 or our model will not run.6. Model Specification Syntax
The double tilde between visual and speed indicates how you would specify a correlation between any variables in the model. A single tilde indicates regression, just like you might use in the lm() function.7. Edit the Model
You could simply turn off the correlation between visual and speed by setting the estimate to zero. When specifying specific correlation paths, it does not matter which variable you start with. This code is similar to the labels we used in the last section.8. Edit the Model (2)
Or we could use one tilde to specify a model that includes a direct relationship between visual IQ tests and speeded tasks where the latent visual variable predicts the speeded task latent. Notice how the output now says Regressions, rather than Covariances, to denote the changed relationship between the variables and only one tilde is included in the output. The estimate is akin to a regression coefficient, in that for every 1 unit increase in visual scores, there is a 0.368 unit increase in speeded task scores.9. Let's practice!
In the following exercises, you will estimate multifactor models and focus on editing model specifications to learn how to build different model types.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.