Error about missing data with categorical predictor

49 views
Skip to first unread message

Curtis Atkisson

unread,
Jan 17, 2025, 1:32:49 PMJan 17
to blavaan
Hi! I have no clue why this is flummoxing me, yet here we are. I'm trying to do a very simple model for a categorical outcome. No matter what model I run it with, executing code of the form

test.model <- '
                test =~ bottle + judge
                rating ~ response
'

test.out <- bsem(test.model, data = wine, bcontrol = list(cores = 3))

Ends up with the error

Error: lavaan->lav_options_set(): missing = “ml” not available in the categorical setting

Despite my best internet poking, I can't figure out how to change that lavaan option in the blavaan call. I must be missing something completely obvious. 

Thanks!

Curtis Atkisson

unread,
Jan 17, 2025, 1:34:34 PMJan 17
to blavaan
Funny thing that I should have said is that there is no missing data in the dataset.

Ed Merkle

unread,
Jan 17, 2025, 3:03:43 PMJan 17
to Curtis Atkisson, blavaan
Curtis,

Thanks for the report! (and this message reminds me that I owe you a response on a separate email)

I am guessing this might be a clash between updates in blavaan and updates in lavaan. Could you send the versions of each? (using sessionInfo() or etc)

Ed


--
You received this message because you are subscribed to the Google Groups "blavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blavaan+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/blavaan/631b8d4a-09f3-46f5-b13e-1d1f3926daden%40googlegroups.com.

Curtis Atkisson

unread,
Jan 17, 2025, 4:06:04 PMJan 17
to Ed Merkle, blavaan
Thanks, Ed! Here is the versions in use from session info:

lavaan_0.6-19       blavaan_0.5-6.1307  Rcpp_1.0.13

Curtis Atkisson

Curtis Atkisson

unread,
Jan 17, 2025, 4:08:07 PMJan 17
to Ed Merkle, blavaan
I also just updated both lavaan and blavaan and got the same error.

Curtis Atkisson

Ed Merkle

unread,
Jan 17, 2025, 6:32:43 PMJan 17
to Curtis Atkisson, blavaan
Thanks, I think I see what is going on. It should work if you explicitly add the "ordered" argument to bsem(). If all your variables are ordinal, add

ordered = TRUE

and if only some variables are ordinal, add their names, like

ordered = c("bottle", "judge")

But this should also work without the ordered argument, so I have something to fix here.

Ed
Reply all
Reply to author
Forward
0 new messages