Issue with Error in if (tmp == 0) { : missing value where TRUE/FALSE needed

24 views
Skip to first unread message

Kiki Ganesan

unread,
Nov 19, 2021, 5:21:58 AM11/19/21
to lavaan
Hi everyone, 

I'm currently running some LCS models on my data. My model was initially working and running well. When I was re-checking some of my results from my models - with one of my variables I came across this issue or error message and therefore my model will not run: 
"Error in if (tmp == 0) { : missing value where TRUE/FALSE needed"

This occurs when I run the line 

lavaan(model,  data=data, estimator='mlr',fixed.x=FALSE, group = 'group', missing='fiml').

This seems to only occur with this particular variable. If anyone has any insight into how to fix this I would appreciate it! I have ensured all missing is specified as 'na'.

Best, 
Keertana 

Shu Fai Cheung

unread,
Nov 19, 2021, 7:18:03 AM11/19/21
to lavaan
How about typing `traceback()` right after the error and pasting the results here, such that we have some hints where this error occurred?

-- Shu Fai
Reply all
Reply to author
Forward
0 new messages