Get startedGet started for free

Model Analysis

1. Model Analysis

Now that we've built our first models, let's work on analyzing our one-factor model.

2. Model Terms

An important consideration in SEM is the identification of the model, which is related to degrees of freedom. Degrees of freedom are calculated by taking the number of possible values you could estimate and subtracting the values you actually estimate. The possible values are set by the number of manifest variables, not the sample size. Therefore, identification occurs when you have enough manifest variables to adequately measure the latent variable, and your model has degrees of freedom greater than zero. Scaling is used to help set up identification. Scaling is similar to z scoring, which helps standardize our model. You can scale the model, not the data, by constraining or setting the variance of the latent variable to 1 and dividing up that variance amongst the manifest variables. Or you can use the more common method and set one of the manifest variable estimates to 1. This second method is the default in lavaan.

3. Analyze the Model

Now you will run and fit your model. You need to name the fitted model and ; I'd recommend using fit in the name to help separate the fitted model from the model specification. Next, we use the cfa() function. The cfa() function runs a confirmatory factor analysis that examines how well the manifest variables represent the latent variable. This function takes two arguments. First, the model argument should include the name of the specified model we defined earlier, which is visual dot model. Second, the data argument includes the name of the data frame that contains the manifest variables, which is the Holzinger dataset. In essence, the cfa() function attempts to estimate the question marks on this diagram, similar to the coefficients found in a regression analysis.

4. Summarize the Results Overall

The summary() function shows you a summary of the fitted model similar to using summary() on regression models. At the beginning of the output, you see basic information about the model. We want to make sure our model is identified, so the degrees of freedom should be greater than zero.

5. Summarize the Results Loadings

Underneath latent variables, we find the coefficients, or loadings. for each of the manifest variables listed in the Estimate column. The one next to the x1 variable indicates that this manifest variable was used for the scaling of the model. These coefficients can be compared to unstandardized regression coefficients. In this example, for every one unit increase in visual speed scores, we see a 0.586 unit increase in X2.

6. Summarize the Results Variances

For each manifest variable and the overall latent variable, you will get an estimate of the error variance. These variances are similar to the estimates of standard deviations for means or coefficients. All of these numbers should be positive, as variance calculations are squared values, and therefore, positive. In a future lesson, we will cover how to troubleshoot models with negative variances. For every estimated value, coefficient, or variance, you will see a standard error of that estimate. These values tell you how much variability there is for the modeled score, and smaller numbers are better. Try not to confuse error variances for the manifest variables with the standard error for each estimate.

7. Let's practice!

In the next section, we will talk more about how to fully explore our fitted models using the summary() function. Let's practice analyzing and summarizing simple models now.