Hi Alex,
Thanks for your quick answer!!
My real model is slightly more complicated that the one I posted (sorry for that). In fact, the multiplier is part of an equality constraint where parameters in one group are defined by parameters in another group. Normally, the multiplier is fixed to 0.5 and in one model it has to be estimated. So here is an example closer to my real model.
In the first one, I use the phantom approach. As you will see, two parameters in the second group (b3 and b5) are defined by a path using two parameters in the first group and the multiplier. I get a multiplier of 2.061. When I check the equalities, this multiplier seems correctly estimated.
HS.model <- 'visual =~ c(a1,b1)*x1 + c(a2,b2)*x2 + c(a3,b3)*x3
textual =~ c(a4,b4)*x4 + c(a5,b5)*x5 + c(a6,b6)*x6
speed =~ c(a7,b7)*x7 + c(a8,b8)*x8 + c(a9,b9)*x9
phantom~multi*1+NA*1#label the multiplier and free it
b3==a3*a5*multi
b5==a2*a6*multi
'
fit <- cfa(HS.model, data = HolzingerSwineford1939, group = "school")
summary(fit)
Now, I use the define operator and define the multiplier based on other parameters and this time the multiplier is 2.873 and, in my example, is way off the other estimation.
HS.model1 <- 'visual =~ c(a1,b1)*x1 + c(a2,b2)*x2 + c(a3,b3)*x3
textual =~ c(a4,b4)*x4 + c(a5,b5)*x5 + c(a6,b6)*x6
speed =~ c(a7,b7)*x7 + c(a8,b8)*x8 + c(a9,b9)*x9
multi:=b3/(a3*a5)
multi:=b5/(a2*a6)
'
fit1 <- cfa(HS.model1, data = HolzingerSwineford1939, group = "school")
summary(fit1)
To my understanding the two models are not the same. In the first, I don't ask the model to estimate b3 and b5 because they are estimated based on parameters in other groups (which is what I need to do). In the second approach, b3 and b5 without constraint and the multi is simply calculated from the estimated parameters. Two questions: Any insight on why the models are different? Is there a more simple way to fit the first model (thus including the inequality constraint).
Many Thanks!!!
JB