Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Multiple regression SEM - Error: lavaan->lav_samplestats_icov(): sample covariance matrix is not positive-definite #3117

Open
2 of 3 tasks
Miiiqm opened this issue Jan 7, 2025 · 2 comments
Assignees
Labels
Module: jaspSem OS: Windows 11 Waiting for requester If waiting for a long time it is reasonable to close an issue

Comments

@Miiiqm
Copy link

Miiiqm commented Jan 7, 2025

JASP Version

0.19.3

Commit ID

No response

JASP Module

SEM

What analysis are you seeing the problem on?

multiple regression

What OS are you seeing the problem on?

Windows 11

Bug Description

Error: lavaan->lav_samplestats_icov():
sample covariance matrix is not positive-definite

Stack trace
.semComputeResults(modelContainer, dataset, options)

lavaan::sem(model = originalSyntax, data = dataset, group = options[['group']])

eval(sc, parent.frame())

eval(sc, parent.frame())

lavaan::lavaan(model = originalSyntax, data = dataset, group = options[['group']], model.type = 'sem')

lav_lavaan_step05_samplestats(slotSampleStats = slotSampleStats, lavdata = lavdata, lavoptions = lavoptions, WLS.V = WLS.V, NACOV = NACOV, sample.cov = sample.cov, sample.mean = sample.mean, sample.th = sample.th, sample.nobs = sample.nobs, ov.names = ov.names, ov.names.x = ov.names.x, lavpartable = lavpartable)

lav_samplestats_from_data(lavdata = lavdata, lavoptions = lavoptions, WLS.V = WLS.V, NACOV = NACOV)

lav_samplestats_icov(COV = cov[[g]], ridge = 1e-05, x.idx = x.idx[[g]], ngroups = ngroups, g = g)

lav_msg_stop(gettext('sample covariance matrix is not positive-definite'))

stop(msg, call. = FALSE, domain = NA)

To receive assistance with this problem, please report the message above at: https://jasp-stats.org/bug-reports

Expected Behaviour

Final Checklist

  • I have included a screenshot showcasing the issue, if possible.
  • I have included a JASP file (zipped) or data file that causes the crash/bug, if applicable.
  • I have accurately described the bug, and steps to reproduce it.
Copy link

github-actions bot commented Jan 7, 2025

@Miiiqm, thanks for taking the time to create this issue. If possible (and applicable), please upload to the issue website (#3117, attaching to an email does not work) a screenshot showcasing the problem, and/or a compressed (zipped) .jasp file or the data file that causes the issue. If you would prefer not to make your data publicly available, you can send your file(s) directly to us, issues@jasp-stats.org

@github-actions github-actions bot added OS: Windows 11 Waiting for requester If waiting for a long time it is reasonable to close an issue and removed Waiting for requester If waiting for a long time it is reasonable to close an issue labels Jan 7, 2025
@tomtomme tomtomme changed the title Multiple regression SEM - [Bug]: Error: lavaan->lav_samplestats_icov(): sample covariance matrix is not positive-definite [Bug]: Multiple regression SEM - Error: lavaan->lav_samplestats_icov(): sample covariance matrix is not positive-definite Jan 7, 2025
@tomtomme
Copy link
Member

tomtomme commented Jan 7, 2025

@Miiiqm
thx for the report. Any chance you could share your .jasp file with us? Otherwise we cannot fix this error.

@tomtomme tomtomme added Waiting for requester If waiting for a long time it is reasonable to close an issue and removed Bug labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: jaspSem OS: Windows 11 Waiting for requester If waiting for a long time it is reasonable to close an issue
Projects
None yet
Development

No branches or pull requests

3 participants