I'm getting an estimate of the latent variable on the scale of my variables instead of an estimation of the latent variable that is constrained to have a mean of zero.
We are employing an SEM.
I'm typically an R user. I did the leg work for the model in R and translated it to python which is friendlier in our pipeline needs. I'm running into an obstacle with semopy that I'm hoping someone can help me with.
In R, I'm able to constrain the latent intercepts so that when I predict the latent values, I'm getting an estimate of the latent variable on the scale of my variables instead of an estimation of the latent variable that is constrained to have a mean of zero. Here is my R model.
IN =~ Q1 + Q3
AT =~ X1 + X2 + X3
SN =~ Q5 + X4 + X5
BC =~ Q6 + Q7
IN =~ AT + SN + BC
AT ~~ SN
X1 ~~ X3
X4 ~~ X5
IN ~ 1 #THIS IS THE CODE THAT ALLOWS ME TO GET THE LATENT MEAN ESTIMATE ON THE SCALE OF MY VARIABLES
AT ~ 1 #THIS IS THE CODE THAT ALLOWS ME TO GET THE LATENT MEAN ESTIMATE ON THE SCALE OF MY VARIABLES
BC ~ 1 #THIS IS THE CODE THAT ALLOWS ME TO GET THE LATENT MEAN ESTIMATE ON THE SCALE OF MY VARIABLES
SN ~ 1 #THIS IS THE CODE THAT ALLOWS ME TO GET THE LATENT MEAN ESTIMATE ON THE SCALE OF MY VARIABLES
Q1 ~ 0*1
X1 ~ 0*1
Q5 ~ 0*1
Q6 ~ 0*1
I haven't been able to figure out how to do this in semopy.
I have this code working in semopy
IN =~ Q1 + Q3
AT =~ X1 + X2 + X3
SN =~ Q5 + X4 + X5
BC =~ Q6 + Q7
IN =~ AT + SN + BC
AT ~~ SN
X1 ~~ X3
X4 ~~ X5
Edited by peerayac