Closed marklhc closed 5 months ago
Thanks for sharing this case. In 0.0.0.9015, currently in the devel
branch, fix_to_zero()
will check the VCOV. If lavaan
issued a warning, then it assumes that something's wrong, e.g., model not identified, and will raise an error, for now. See #23
In #18, I will revise fix_to_zero()
such that, if something's wrong and LRT p-value cannot be computed, it will return NA
or a similar value isntead of raising an error. lrtp()
will then indicate the problem in the output to alert the users that something's wrong with fixing those paraemters to zero, while the LRT p-values for other parameters are still computed and reported.
In #24 , fix_to_zero()
, lrt()
, lrtp()
, and print.lrtp()
now can handle error encountered in fixing the parameter to zero or in doing the LR test. If a problem occurs, the error will be recorded, instead of raising an error. Users will be notified of this when the results are printed.
This issue can be closed for now because some methods are implemented to try to identify cases with identication issues.
This seems to be an interesting case: A two-factor model with five indicators, which is identified when the covariance between factors are not zero:
Note, however, that the LRT p value does not agree with the LB CI. When looking at the constrained model, the model is not identified, because
f2
only has two indicators, and the model does not allow shared variances with indicators forf1
.lavaan
still computes the model chi-square:To identify the local model for
f2
, I constrain the loadings to equal (and 1.0) for both indicators. The model is identified now, and the chi-square is exactly the same, but now we have one more df:Created on 2024-03-07 with reprex v2.1.0
So I think we may need some more ways to check whether the constrained model is really identified. Here
lavaan
does indicate that the standard errors cannot be computed due to potential under-identification.