Errors-in-variables regression using estimated latent variables