`reliabilityL2(object, secondFactor)`

object

The lavaan model object provided after running the

`cfa`

, `sem`

, `growth`

, or `lavaan`

functions that has a second-order factorsecondFactor

The name of the second-order factor

- Reliability values at Levels 1 and 2 of the second-order factor, as well as the partial reliability value at Level 1

`reliability`

) will be mainly used in the calculation. The model-implied covariance matrix of a second-order factor model can be separated into three sources: the second-order factor, the uniqueness of the first-order factor, and the measurement error of indicators:
$$\hat{\Sigma} = \Lambda \bold{B} \Phi_2 \bold{B}^{\prime} \Lambda^{\prime} + \Lambda \Psi_{u} \Lambda^{\prime} + \Theta,$$
where $\hat{\Sigma}$ is the model-implied covariance matrix, $\Lambda$ is the first-order factor loading, $\bold{B}$ is the second-order factor loading, $\Phi_2$ is the covariance matrix of the second-order factors, $\Psi_{u}$ is the covariance matrix of the unique scores from first-order factors, and $\Theta$ is the covariance matrix of the measurement errors from indicators. Thus, the proportion of the second-order factor explaining the total score, or the coefficient omega at Level 1, can be calculated:
$$\omega_{L1} = \frac{\bold{1}^{\prime} \Lambda \bold{B} \Phi_2 \bold{B}^{\prime} \Lambda^{\prime} \bold{1}}{\bold{1}^{\prime} \Lambda \bold{B} \Phi_2 \bold{B} ^{\prime} \Lambda^{\prime} \bold{1} + \bold{1}^{\prime} \Lambda \Psi_{u} \Lambda^{\prime} \bold{1} + \bold{1}^{\prime} \Theta \bold{1}},$$
where $\bold{1}$ is the `reliability`

for the reliability of the first-order factors.```
HS.model3 <- ' visual =~ x1 + x2 + x3
textual =~ x4 + x5 + x6
speed =~ x7 + x8 + x9
higher =~ visual + textual + speed'
fit6 <- cfa(HS.model3, data=HolzingerSwineford1939)
reliability(fit6) # Should provide a warning for the endogenous variable
reliabilityL2(fit6, "higher")
```

Run the code above in your browser using DataCamp Workspace