sfcheung / semfindr

A find(e)r of influential cases and outliers in SEM
https://sfcheung.github.io/semfindr/
GNU General Public License v3.0
1 stars 0 forks source link

issue with testthat test checking for convergence #107

Closed yrosseel closed 5 months ago

yrosseel commented 6 months ago

The test in test-lavaan_rerun_multi_nonconvergence.R checks how many times a run converges after running lavaan_rerun(). Out of 20 runs, this was 18. But after making some small changes in the lavaan optimizer, now 19 out of 20 runs converge. Hence the test fails.

In the future, lavaan will try even harder to obtain convergence by using different sets of random starting values. In other words, this may change again in the future. Therefore, I am not sure if this test is useful, as the convergence status may change across different versions. I would suggest to remove it.

sfcheung commented 5 months ago

Thanks for your suggestion. We need a test to see whether nonconvergence cases are correctly detected and recorded. However, I should not have hard-coded the numbers of nonconvergence cases into the test. I will keep the test but amend it such that it can adapt to possible changes in the number of nonconvergence cases in future versions of lavaan.

sfcheung commented 5 months ago

Fixed in #109.