Hi. I am trying to compare the fit of two SEM models. One has two latent variables and the other one only one of the two latent variables. The full model is
sem (CompDig -> cDa CDb cDc cDd cDe cDf) (OriDig -> oDa oDb oDd oDe);
the restricted model is
sem (CompDig -> cDa CDb cDc cDd cDe cDf).
I would like to perform a likelihood ratio test. However, you cannot directly apply the lrtest command because the models are not nested. In fact, the second model has less degrees of freedom than the first, since the covariance structure is smaller. What is the correct way of restricting the first model to make the second a model nested in the first? Restricting the oD’s to zero does not work, the matrix is not full rank. After many attempts I came to this solution (I have 301 observations. I am using Stata version 17):
Is this the correct procedure? At least the degrees of freedom and the size of the matrices are consistent. Thanks!!!
sem (CompDig -> cDa CDb cDc cDd cDe cDf) (OriDig -> oDa oDb oDd oDe);
the restricted model is
sem (CompDig -> cDa CDb cDc cDd cDe cDf).
I would like to perform a likelihood ratio test. However, you cannot directly apply the lrtest command because the models are not nested. In fact, the second model has less degrees of freedom than the first, since the covariance structure is smaller. What is the correct way of restricting the first model to make the second a model nested in the first? Restricting the oD’s to zero does not work, the matrix is not full rank. After many attempts I came to this solution (I have 301 observations. I am using Stata version 17):
Code:
qui sem (CompDig -> cDa - cDf) (OriDig -> oDa oDb oDd oDe) estat gof ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(34) | 77.691 model vs. saturated p > chi2 | 0.000 chi2_bs(45) | 2334.832 baseline vs. saturated p > chi2 | 0.000 ---------------------------------------------------------------------------- estimates store full qui sem (CompDig -> cDa - cDf) (-> oDa oDb oDd oDe, nocon) estat gof . estat gof ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(43) | 4028.621 model vs. saturated p > chi2 | 0.000 chi2_bs(45) | 2334.832 baseline vs. saturated p > chi2 | 0.000 ---------------------------------------------------------------------------- lrtest full Likelihood-ratio test Assumption: . nested within full LR chi2(9) = 3950.93 Prob > chi2 = 0.0000
Comment