Non-normalized data in a GLM how to handle?

Knowing what your priors should be is much easier when working with standardized data. It’s one of the main reasons I prefer standardizing. But if you want to keep your data in raw form, you need to figure out how to craft your priors accordingly. Here would be one easy way to begin:

b0 = pm.Normal("b0", mu=np.mean(y, axis=0), sigma=10, shape=2)

This uses the observed means to “move” the priors on the 2 intercept terms to be “in the vicinity” of the data.

A more general approach would be to tweak priors and then use prior predictive sampling to inspect the resulting implications and see if they match your intuition/knowledge.

2 Likes