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]: Chi-sqaure change with addtion of second model #2302

Closed
3 tasks done
jonathanbart opened this issue Sep 25, 2023 · 1 comment · Fixed by jasp-stats/jaspSem#182
Closed
3 tasks done

[Bug]: Chi-sqaure change with addtion of second model #2302

jonathanbart opened this issue Sep 25, 2023 · 1 comment · Fixed by jasp-stats/jaspSem#182

Comments

@jonathanbart
Copy link

JASP Version

0.18.0

Commit ID

No response

JASP Module

SEM

What analysis are you seeing the problem on?

Structural Equation Modelling

What OS are you seeing the problem on?

Windows 10

Bug Description

The bug occurs when estimating a measurement and then structural model. When estimating the second model (the structural model) in a second tab, the chi-squared value of the first model changes. This bug seems to only happen when using the Satorra-Bentler model test.

image

image

Expected Behaviour

I assume there should be no change in the initial model chi-square value. Unless my knowledge of SEM is lacking.

Steps to Reproduce

Step of analysis:

  1. Import attached data set
  2. Change all variables to scale
  3. Open Structual Equation Modelling module and change estimation option to:
  • Error calculation: Robust
  • Estimator: ML
  • Model test: Satorra-Bentler
  1. Estimate the following measurement model in Tab 1:

phy =~ phy1 + phy2
nut =~ nut1 + nut2
swb =~ swb1 + swb3 + swb4
ga =~ ga1 + ga2 + ga3

Note, the chi squared value for Model 1 is 68.307

  1. In Tab 2 estimate the following structural model:

phy =~ phy1 + phy2
nut =~ nut1 + nut2
swb =~ swb1 + swb3 + swb4
ga =~ ga1 + ga2 + ga3
swb ~ phy + nut
ga ~ swb

Note, the chi-square for model 1 is now 68.269

data.csv

Log (if any)

No response

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.
@juliuspfadt
Copy link
Contributor

@jonathanbart thanks for creating the issue. There was a problem with the R-package lavaan (which the SEM module is based on), because it uses always the standard chisq test statistic for the likelihood ratio difference test, even though you have specified to use the Satorra.Bentler test statistic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants