simsem / semTools

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

Feature request: Please don't deprecate 'measurementInvariance' #93

Closed WLenhard closed 3 years ago

WLenhard commented 3 years ago

Hi there, semTools is a package, I very frequently use. The measurementInvariance function is marked as deprecated. You refer to the limitations of the function in the doumentation and recommend the use of measEq.syntax. On the other hand, it directly implements the established approach in the field of measurement invariance testing and is extremely economical. It serves the basic purpose in a very good way. I use it frequently and would love it if the function was not removed from the package.

Best regards, Wolfgang

TDJorgensen commented 3 years ago

it directly implements the established approach in the field of measurement invariance testing and is extremely economical

The established approach is to stop fitting models whenever an omnibus null hypothesis is rejected, to establish partial invariance before moving on to more restrictive levels (in which case intercepts are not equated for indicators whose loadings could not be equated). So the economy of the measurementInvariance() function is that it does not obey best practices.

For what it is worth, I will leave it (deprecated) in the package without removing it, until I can replace it with a different (economically automated) function that is capable of detecting when it should stop fitting models (e.g., using potentially multiple criteria that the user can specify). That has been on my TODO list for years, so you can continue count on the deprecated function until a better one is available, which will also be applicable to models with mixtures of measurement scales that test invariance across any combination of groups and occasions.