SEM / Path Analysis *crash* (cannot handle 12 variables)

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
hayaku
Posts: 7
Joined: Thu Aug 13, 2020 5:08 pm

SEM / Path Analysis *crash* (cannot handle 12 variables)

Post by hayaku »

Hi,

Under "Endogenous models", when I try to drag larger numbers (>11) of 'Endoenous Covariates' into "Models for Endogenous vars" Jamovi completely locks up and crashes. Requires task manager to destroy, and I have to restart.

As such, variables must be dragged in one at a time (time consuming, annoying, slow). But this also produces an error ("Ivaan ERROR: fit measurement not available if model did not converge").

It appears this error is caused by having 12 variables in at once. 11 of any combination works just fine.

Anyone able to help?
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: SEM / Path Analysis *crash* (cannot handle 12 variables)

Post by mcfanda@gmail.com »

Hi,
would you like to share an example of this issue? I've tried with some datasets and I'm not able to reproduce the bug
hayaku
Posts: 7
Joined: Thu Aug 13, 2020 5:08 pm

Re: SEM / Path Analysis *crash* (cannot handle 12 variables)

Post by hayaku »

Hi,

So I have done a little playing around/debugging, and I think there are two issues at heart.

1) When I try to drag variables between "Exogenous models" and "Endogenous Covariates", it defaults to "All interactions" (So basically creates >4000 variables, which crashes the program) instead of defaulting to "Main Interactions", which would seem far more logical/practical/useful.

Is there any way you can change the default drag-and-drop assumptions here?

2) Something very strange is happening with row counts. I generated some random numbers to replicate my dataset, and could not produce the crash. However, it seems deleting even a SINGLE row from this dataset causes the "Lavaan ERROR" when exceeding 11 variables.

In other words, all 12 variables work perfectly fine on "SAMPLE.omv" however I can only use 11/12 variables from "Sample_v2.omv", adding the 12th pushes it into breaking.

I do not think this has anything to do with data, but is a bug in relation to how row counts/numbers are handled, and something within this package not appropriately updating when you delete rows in a dataset.

Thanks!!!!!!!!!

PS—[TOTAL_1] for "Exogenous Variable"; [Q1–12] for "Exogenous covariates"
Attachments
SAMPLE_v2.omv
Exact same file, but with ~32 rows deleted. Produces crash! ("Lavaan ERROR: fit measures not available if model did not converge")
(57.06 KiB) Downloaded 305 times
SAMPLE.omv
12 x sets of random numbers [0-4] with a sum variable [0-48] and a dummy [0-48].
Produces NO Crash!!
(225.11 KiB) Downloaded 253 times
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: SEM / Path Analysis *crash* (cannot handle 12 variables)

Post by mcfanda@gmail.com »

Hi,
thanks for sharing the examples. I've run them and I do not think the output is due to a bug. When you get "Lavaan ERROR: fit measures not available if model did not converge" is not a crush or a bug. It means that the model does not coverge, so there's something wrong with the model specification. When you remove rows from the data, you are changing the correlation among variables, which may lead the model to become unestimable.

The issue is not related to the number of variables either. If you take SAMPLE_v2, remove var 12 and add a random variable (you can compute it in "compute variable" as NORM(0,1)), such that the model is still of 12 exogenous variables, you'll see that the model converges. I've tried with 30 variables and it still works fine.

As regards the arrow button behavior, that is standard behavior in jamovi. The idea is that you can use the first arrow to get all possibile effects at once, but you are free to use the second arrow to pick the effects you need (only main effects, or 2-ways interactions, etc). In different applications would be difficult to know what a "main interaction" is.
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: SEM / Path Analysis *crash* (cannot handle 12 variables)

Post by mcfanda@gmail.com »

In the next version, I'll make the module to give the results anyway (even when the model did not converge), so one can examine what's wrong with the model.
Post Reply