We have three observed variables: gender, education and wage. We know that IQ also influences education (outcome) and wage, but it's unobserved.
So we model IQ as a latent individual parameter.
and we constrain c to have positive priors.
So we can exploit the fact that iq appears in two equations, it's the shared hidden factor of edu and wage.
The posterior results look similar to our simulation parameters, they can be seen
in the model.png
file.
Please compare to the model with no hidden factor in altmodel.png
.
Some of the estimated parameters are closer to true value in the more complex model. The variance of the error is smaller in the complex model.
The correlation between estimated u and actual iq is 0.74.