# Testing Inequality Constrained Hypotheses in SEM with lavaan

I'd like to know how can I test for inequality of estimates in a lavaan::sem() fitted model (using R)?
Also, is there a known way to control for the fact that some estimates come from reverse scored scales?

The example model I work with is specified as:

model <- '
# measurement model
opp =~ FTP1 + FTP2 + FTP3 + FTP9
ext =~ FTP4 + FTP5 + FTP6 + FTP7
const =~ FTP8 + FTP9 + FTP10
ses =~ SES1 + SES2 + SES3 + SES4 + SES5 + SES6
# regressions
ses ~ opp + ext + const
'


From the summary() of my fit <- sem(model, data=w1) object I can tell that one of the predictors is unsignificant

Regressions:
Estimate  Std.Err  z-value  P(>|z|)
ses ~
opp               0.148    0.035    4.266    0.000
ext               0.103    0.072    1.440    0.150
const            -0.090    0.025   -3.668    0.000


Given these numbers i'd like to test the difference between ses~opp and ses~const estimates but considering the fact, that const was computed out of reverse scored questions.

I know how to call a Wald Test of Parameter Constraints in Mplus to test the difference between the two estimates. But I sense, that the fact it is significant is due to reversed scores:

Wald Test of Parameter Constraints

Value                             13.131
Degrees of Freedom                     1
P-Value                           0.0003


I wonder how can I do it in R, and control for the fact that same of my scales have negative estimates due to the way they are measured?

Please note, that I'm very new to SEM and odds are I'm after something not making any sense. If that's the case, please let me know. I'm happy to learn. All the best. Thank you.

You can create new parameters in lavaan with the := symbol.

model <- '
# measurement model
opp =~ FTP1 + FTP2 + FTP3 + FTP9
ext =~ FTP4 + FTP5 + FTP6 + FTP7
const =~ FTP8 + FTP9 + FTP10
ses =~ SES1 + SES2 + SES3 + SES4 + SES5 + SES6
# regressions
ses ~ a * opp + b * ext + c * const
'


You want to know if a differs from c, but reversing c. To reverse c, use -c. Then:

diff := a - (-c)


Or equivalently:

diff := a + c


Diff is the difference you are interested in.