jasp-issues icon indicating copy to clipboard operation
jasp-issues copied to clipboard

[Bug]: 1. Process module analysis terminated unexpectedly, 2. does not perform local tests, 3. does not show parameter estimates of paths in statistical path plots

Open psychuser00 opened this issue 11 months ago • 4 comments

JASP Version

0.18.3

Commit ID

No response

JASP Module

Process

What analysis are you seeing the problem on?

Mediation

What OS are you seeing the problem on?

Windows 10

Bug Description

jasp file.zip I've attached the jasp file with data, and showing the error with the specified model in the process module. I'm running a dual mediator model, and it has three errors:

  1. It returns the error "analysis terminated unexpectedly."
  2. When I request "tests - local tests - linear" it says there are no model implied independecies, but X3 and X4 are implied independent by the model.
  3. When I request the statistical path plot, it does not add to the plot "parameter estimates"

Expected Behaviour

  1. I expected the model to run, not terminate unexpectedly
  2. I expected local tests to show
  3. I expected to see parameter estimates in the statistical path plots

Steps to Reproduce

  1. I've provided the jasp file with the model specified

...

Log (if any)

No response

Final Checklist

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

psychuser00 avatar Mar 04 '24 04:03 psychuser00

@psychuser00 Can confirm 2. and 3. Not 1.

When I open the provide file the option "Local tests" is already checked. And only then I can reproduce the error in 0.18.3 and 0.19beta. When I uncheck "Local tests", everything is fine.

Full error message:

This analysis terminated unexpectedly.

Error in svd(X): infinite or missing values in 'x'

Stack trace
dagitty::localTests(graph, dataset, type = testType, conf.level = options$ciLevel, R = nReps)

as.data.frame(row.names = row.names, t(sapply(tests, f)))

t(sapply(tests, f))

sapply(tests, f)

lapply(X = X, FUN = FUN, ...)

FUN(X[[i]], ...)

.ci.test.covmat(sample.cov, sample.nobs, i, conf.level, tol)

MASS::ginv(sample.cov)

svd(X)

stop('infinite or missing values in 'x'')

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

And log from konsole including switching "Local Tests" on and off:

flatpak run --branch=stable org.jaspstats.JASP
Desktop:        QML cache directory: /home/tom/.var/app/org.jaspstats.JASP/cache/JASP/JASP/qmlcache_1cfa6cb9d16ab49153b8a8c0b9d0288ec7941c79
Making new argument list for Application startup: JASP
Starting JASP 0.18.3 from commit 1cfa6cb9d16ab49153b8a8c0b9d0288ec7941c79 and branch HEAD
QtWebEngineQuick initialized
Application initialized
Application init entered
MainWindow constructor started
TempFiles::createSessionDir(): '/home/tom/.JASP/temp/3' about to be (removed and re)created.
Going to construct the necessary models for JASP to function.
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-tr.qm
Desktop:        Invalid translation file found with name: jaspDesktop-tr.qm
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-ru.qm
Desktop:        Language (Russian) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-es.qm
Desktop:        Language (Spanish) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pt_BR.qm
Desktop:        Invalid translation file found with name: jaspDesktop-pt_BR.qm
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-zh_Hans.qm
Desktop:        Language (Chinese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-ja.qm
Desktop:        Language (Japanese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-fr.qm
Desktop:        Language (French) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-nl.qm
Desktop:        Language (Dutch) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-zh_Hant.qm
Desktop:        Language (Chinese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pl.qm
Desktop:        Language (Polish) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-de.qm
Desktop:        Language (German) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-id.qm
Desktop:        Language (Indonesian) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-gl.qm
Desktop:        Language (Galician) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-pt.qm
Desktop:        Language (Portuguese) not registered in LanguageModel, adding it now
Desktop:        Checking qm file: /app/Resources/Translations/jaspDesktop-eo.qm
Desktop:        Invalid translation file found with name: jaspDesktop-eo.qm
Desktop:        Opened internal sqlite database for creation at '/home/tom/.JASP/temp/3/internal.sqlite'.
Desktop:        DataSet::DataSet(index=-1)
Desktop:        UPDATE DataSet 1 with Empty Values: {
        "emptyValuesPerColumn" : {},
        "missingDataPerColumn" : {},
        "workspaceEmptyValues" : 
        [
                ".",
                "NA",
                "NaN",
                "nan"
        ]
}

Desktop:        DataSetPackage::reset()
Desktop:        DataSet::DataSet(index=-1)
Desktop:        UPDATE DataSet 1 with Empty Values: {
        "emptyValuesPerColumn" : {},
        "missingDataPerColumn" : {},
        "workspaceEmptyValues" : 
        [
                ".",
                "NA",
                "NaN",
                "nan"
        ]
}

Desktop:        UPDATE DataSet 1 with Empty Values: {
        "emptyValuesPerColumn" : {},
        "missingDataPerColumn" : {},
        "workspaceEmptyValues" : 
        [
                ".",
                "NA",
                "NaN",
                "nan"
        ]
}

Desktop:        DataSetPackage::endLoadingData
Desktop:        ColumnEncoder::setCurrentNames(#0)
Entering eventloop
Loading required namespace: ragg
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:101:25: QML RowLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:101:25: QML RowLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
qrc:/components/JASP/Controls/ComponentsList.qml:60:3: Unable to assign [undefined] to bool
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:101:25: QML RowLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
Error in eigen(dataset) : infinite or missing values in 'x'
In addition: Warning messages:
1: ! Legacy `RNGkind(sample.kind = 'Rounding')` is used by default.
ℹ To use the current `RNGkind()` setting instead, use `options(jaspLegacyRngKind = FALSE)`.
This warning is displayed once every 8 hours. 
2: In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'resources/0/state', probable reason 'No such file or directory'
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:101:25: QML RowLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:101:25: QML RowLayout: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
file:///app/Modules/jaspProcess/jaspProcess//qml/ClassicProcess.qml:57:17: QML GroupBox: Detected anchors on an item that is managed by a layout. This is undefined behavior; use Layout.alignment instead.
Error in eigen(dataset) : infinite or missing values in 'x'
In addition: There were 11 warnings (use warnings() to see them)
Error in eigen(dataset) : infinite or missing values in 'x'
In addition: Warning messages:
1: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
2: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
3: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
4: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
5: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
6: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
7: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
8: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
9: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
Error in eigen(dataset) : infinite or missing values in 'x'
In addition: Warning messages:
1: In cov2cor(cov(data)) :
  diag(.) had 0 or NA entries; non-finite result is doubtful
2: In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'resources/0/state', probable reason 'No such file or directory'
Error in eigen(dataset) : infinite or missing values in 'x'
In addition: Warning messages:
1: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
2: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
3: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'character' to logical
4: In all(c(est$rhs[i], est$lhs[i])) :
  coercing argument of type 'charact

tomtomme avatar Mar 05 '24 07:03 tomtomme

@maltelueken @psychuser00 In current beta, if I check "residual covariances => mediator" or "local test => linear => bootstrap" or something else as linear, then the error of 2. disappears. So I am not sure that this is a bug, originating from the missing values in the data set - as indicated by the error message - or by a misspecification of the model. Maybe @psychuser00 can elaborate on this.

@maltelueken Any idea if this is fixable / a real bug?

Also "parameter estimates in the statistical path plots" are still missing in current 0.19 beta

tomtomme avatar Apr 04 '24 08:04 tomtomme

@maltelueken can you take a look if this is still relevant? this is one of the last bugs that needs some attention before the release.

JohnnyDoorn avatar May 07 '24 10:05 JohnnyDoorn

Thanks for reminding me! The problem with Error in svd(X): infinite or missing values in 'x' still persists, but the issue here is that the data set contains rows which are completely empty (NA for all columns). This is quite a rare situation because those rows would typically not occur. The problem can easily be solved by removing the empty rows, but I will also fix the error for the release.

maltelueken avatar May 07 '24 11:05 maltelueken