Difficulties setting good priors for ex-gaussian hierarchical model using brms

I tried to dig into this a bit deeper so that @paul.buerkner doesn’t have to and I think I understand what is going on:

  • The predictor in brms predicts the mean of the exgaussian, not the mean of the gaussian component, so taking the wikiepdia notation for the distribution parameters (which is the same as in Stan), the main predictor of the model (let’s call it \bar\mu) is defined as \bar\mu = \mu + \beta where \lambda = 1/\beta.
  • The model is quite certain about the main predictor \bar\mu, which is what you see as the result of posterior_epred
  • The model is also quite certain about \sigma, but it is uncertain about \beta which leads to a large uncertainty about \mu, and if \beta is large but \bar\mu small (as you see in the plots from posterior_epred), it means that \mu = \bar\mu - \beta is hugely negative.
  • With hugely negative \mu, small \sigma and large \beta, the resulting draw from the exponentially modified gaussian is basically something_very_negative + rexp(shape = large_number) which I think is what generates those extreme tails in your predicted plot.

To me this looks like the model is behaving as designed, but the design seems weird. Not sure what the standards of the field are, but I guess that @HanneHuygelier expected the main predictor to model \mu not \bar\mu (this can still be achieved via a custom brms family, if that’s what you want).

EDIT: This is exactly what was discussed at Modelling mean of gaussian component in brms version 2.3.0 I obviously could have saved myself some trouble by reading that first :-D.

3 Likes