Weighted Regression


Hi everyone, having fun applying Greta software for Bayesian Analysis. I want to inquire how to perform a weighted regression on Greta.

Thank you



greta lets your write out a statistical generative model; i.e. the operations and variables that describe how the observed data could have been generated by the process. Bayesian analysis typically focusses on generative models.

Weighted regression is a non-generative approach. Rather than saying how the data was generated, it says that some data should be discounted, receiving only a fraction of the full weight of a single data point. So that philosophy is quite different than what greta (and Stan, JAGS, BUGS etc.) aims to do, and consequently there is not a way of applying weights to data in greta.

In some situations you can express the uncertainty over data as part of the generative model. E.g. if you have normally distributed data, you can encode that additional uncertainty as a higher standard deviation in the observation model distribution.

There’s a discussion about this on the stan forum, where the stan developers advise against doing this because it’s not Bayesian. Unlike stan, you can’t manually adjust the joint density in greta, for reasons described here.