This gives the error
Error in res0$parameters : $ operator is invalid for atomic vectors
When looking into the source code I found that the problem arises because the lsem.permutationTest function does not consider the sufficient_statistics argument of the lsem.object when estimating LSEMs with the permuted data sets. However, because I want to use the MLM estimator, lavaan threw an error when using the default of sufficient_statistics = TRUE.
In the pull request, I added sufficient_statistics to arglist which fixed the error.
Hello Alexander,
I ran into a problem with the
lsem.permutationTest
function.Here is a reproducible example:
This gives the error
Error in res0$parameters : $ operator is invalid for atomic vectors
When looking into the source code I found that the problem arises because the
lsem.permutationTest
function does not consider thesufficient_statistics
argument of thelsem.object
when estimating LSEMs with the permuted data sets. However, because I want to use the MLM estimator, lavaan threw an error when using the default ofsufficient_statistics = TRUE
.In the pull request, I added
sufficient_statistics
toarglist
which fixed the error.