You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some very skew ordinal data which has some gaps in some of the frequency tables for each of two groups and I received an error when using the allow.empty.cell = TRUE option which is required due to the following error:
Error : lavaan->lav_samplestats_step1():
some categories of variable `x3' are empty in group 1; frequencies are
[53, 13, 12, 4, 7, 6, 2, 1, 2, 0]
In addition: There were 25 warnings (use warnings() to see them)
I recently added this argument for use with blavaan (see #377), because the priors in a Bayesian model can help to handle empty cells (using bcfa() in place of cfa()).
I think an NaN gradient is the correct behavior for lavaan, because some of the threshold parameters cannot be informed by the data. But I can add something to the docs along with a more informative message about the use of allow.empty.cell.
Thanks for the information about blavaan and the reference to the PR.
I have run the example using blavaan and it does survive so that is positive. However, I would have thought (somewhat naiively I guess) that the allow.empty.cell would have simply filled in the empty cells with 0.5 (or whatever is specified in zero.add[2]) and returned something.
In particular, it seems strange to me that I can get a fit back when allow.empty.cell = FALSE for group 1:
I have some very skew ordinal data which has some gaps in some of the frequency tables for each of two groups and I received an error when using the
allow.empty.cell = TRUE
option which is required due to the following error:Here is a reprex
yields error
That particular error is easy to fix...
but that is not the end of the story as we now get NaN gradients when running
The text was updated successfully, but these errors were encountered: