Measurement error model in covariates for future predictions

Hi guys, i have a conceptual question.

I’ve built a model in the past with error-free covariates, since the data was gathered in a very controlled environment.

Possessing the posterior distribuition of the parameters, i can simply calculate the posterior distribution for new data as:

\theta \sim p(\theta|y_{old})
\sigma \sim p(\sigma|y_{old})
Y_{new} \sim normal(h(X_{new}, \theta), \sigma)

where h is some model function

Now, suppose new data is prone to measurement error, with known stardad deviation (\sigma_{x}). Can i just plug the measurement model in the sampling scheme? such as:

\theta \sim p(\theta|y_{old})
\sigma \sim p(\sigma|y_{old})
X_{new} \sim normal(X_{measured}, \sigma_{x})
Y_{new} \sim normal(h(X_{new}, \theta), \sigma)

Best regards.

That’s an interesting question. You are saying the variance is known, but in a bayesian model if that is not estimated together with the other parameters this would be prior information. If you simply use your previous estimate of the posterior of all other parameters and add uncertainty to a previously fixed value you will not be drawing from the posterior for the latter, it will be more like a prior.

More realistically, I will assume that by “known” you mean it was estimated independently, and I’d suggest that for a fully bayesian treatment that \sigma_x is included as a parameter in the model – together with X with a suitable normal distribution X \sim \mathcal{N}(\mu_x, \sigma_x) – then you’d have a posterior for the whole thing.

Of course, you are absolutelly right, they won´t be jointly distributed.

The literature are more concerned with the parameter estimation step, not so much with future predictions.

However, the data used to build the model are not prone to significant measurement error. (Imagine data gathered in the lab at a very controlled manner)

But the ultimate goal is to use such model to predict the behaviour of the process in an industrial environment.

Using the prior information about the measurement error, estimated independently, is a way of propagating this uncertainty? I know that the effect of the variable is likely to be attenuated, but i want to check the effect of the covariate measurement error in the response credible intervals.
Does it make any sense to do this?

Can i just plug the measurement model in the sampling scheme?

I think the answer is Yes, at least when assuming that the rest of the model makes sense.

Assuming your measurement process adds noise to the observations (the alternative is that you’re using some kind of smoothed version of the underlying values, such as fitted values from some other model), you’ll want to change the model from what you have above to the following:

x_measured ~ normal( x_new, sigma_x )
y_new ~ normal( H(x_new, theta), sigma )

This one states: x_{measured} = x_{new} + \epsilon, \epsilon \sim normal(0, \sigma_x) (your observation is the truth plus noise, where \sigma_x is given from your past experiments or whatever), whereas you have the terms reversed.

As @caesoma says, you’ll want to specify a prior distribution for x_new:

x_measured ~ normal( x_new, sigma_x )
y_new ~ normal( H(x_new, theta), sigma )
x_new ~ some_prior_probability()

but I’ll suggest that you think carefully about your choice. That choice can be highly influential. For example, when I look at census tract survey estimates of economic data, I do not use a normal prior for the values because I know that there is a lot of economic polarization in our society, and the normal prior would conflict with this (and other) background knowledge. If you use a normal prior but the observations have heavy tails or are skewed, you may see a strong pull towards the mean, which may or may not be smart depending on your subject matter. You probably have background knowledge about x_new, I suggest you use that to guide your decision.

You can use the knowledge about the measurement noise as a prior for X and can make those as narrow as you are confident about the measurements.
If your goal is prediction you can check the performance of different priors (or the version with fixed or arbitrary distribution of the parameter) using cross validation. I don’t think any version is necessarily better than the other, it depends on what you want to do.