simsem / semTools

Useful tools for structural equation modeling
74 stars 36 forks source link

semTools::measurementInvariance is lacking a description for the fit.measures argument #41

Closed Jo-Karl closed 6 years ago

Jo-Karl commented 6 years ago

The function internally calls the printInvarianceResult function from the equaltestMI package. It is not documented in either function how fit measures can be selected.

TDJorgensen commented 6 years ago

The function internally calls the printInvarianceResult function from the equaltestMI package.

No, printInvarianceResult() is a hidden function in semTools, originally written by @yrosseel when measurementInvariance() was part of the lavaan package.

https://github.com/simsem/semTools/blob/master/semTools/R/measurementInvariance.R#L247

@gabriellajg copied that function and adapted it to use in her equaltestMI package. Since she decided to make the function public, I agree her documentation could be more informative, and you can feel free to post that issue on her GitHub page.

https://github.com/gabriellajg/equaltestMI/issues

It is not documented in either function how fit measures can be selected.

?measurementInvariance documents it, and shows how to use it in the Examples. It is simply the same fit.measures= argument from ?lavaan::fitMeasures.

Note that in the current version of semTools, you will now find this documentation using ?`measurementInvariance-deprecated` because this function is now deprecated in favor of the more general measEq.syntax() function.

TDJorgensen commented 6 years ago

FYI, in an email correspondence with @gabriellajg, she said that function was only made public by accident, so you can expect it to be hidden in the next release of equaltestMI. For model-comparison tables, I recommend using the semTools::compareFit() function. Find an example for measurement-invariance model comparison on the ?measEq.syntax help page.