In any case, this is not supposed to happen. I would like to investigate
this further. Would you be able to email me your dataset (or a snippet
of the datset) and a small R script, so I can reproduce this?
Please send it to Yves dot Rosseel at UGent dot be
Yves.
On 11/30/20 5:18 PM, Michael P. Grosz wrote:
> ok, thanks a lot for the advice!
>
> On Monday, November 30, 2020 at 1:25:30 PM UTC+1 Terrence Jorgensen wrote:
>
> pi.i is a casewise probability. Not sure how it could occur that
> one would be negative, which is the only thing that would
> triggerlog() to return NaN, except the arbitrary case log(NaN).
> Perhaps there is a case withpi.i == 0, and machine imprecision just
> yielded something like-1e-16 in this case.
>
> 1. Check your univariate tables for each ordinal indicator to see
> if any categories are zero (although lavaan should already be
> catching cases like that, and returning more informative messages).
> 2. Also, check whether this happens when you remove age + sex from
> your model, or if you leave them in but set
> conditional.x=FALSE. There may be a situation where the zero
> counts only occur for subsets of the data (e.g., contingency
> tables of sex by each indicator), so conditioning on the
> exogenous covariate is leading topi.i being zero (but machine
> imprecision yields a super small negative value).
> 3. You do not declare any variablesordered=, so I assume they are
> already of classc("ordered","factor") in your data.frame. Try
> <
http://www.uva.nl/profile/t.d.jorgensen>
>
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
lavaan+un...@googlegroups.com
> <mailto:
lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/2a0ace8f-c30f-4874-b85d-a02ad9a25185n%40googlegroups.com
> <
https://groups.google.com/d/msgid/lavaan/2a0ace8f-c30f-4874-b85d-a02ad9a25185n%40googlegroups.com?utm_medium=email&utm_source=footer>.