Reducing tail on gamma distributed brms glmm pp_check

Hi all,

I am very very new to Stan, brms, bayesian modelling.

I have been trying to model kilograms against 2 unscaled continuous variables and 1 random effect (2 categories) using a glmm, and the data looks to fit a gamma distribution. Kilograms cannot be <0.

I set the following prior and ran the following model using brms in RStudio.


prGam = prior=c(prior(normal(0,2),class="Intercept"), 
                prior(normal(0,2),class="b"),    
                prior(gamma(0.5, 0.01),class="shape"))

brm(
  kilograms ~ b + c + (1 | d), 
  data  = dataFrame,
  chains = 4, iter = 1500, warmup = 500,
  control = list(adapt_delta = 0.90, max_treedepth = 20),
  cores = 1,
  seed = 12,
  inits = 0,
  prior = prGam,
  family = Gamma(link="log"),
)

The pp_check of the model looks the following way:

image

It looks like the model is doing an okay job, but as you can see there is quite a long tail in the yreps, which seems to exceed the data by 4x the highest value.

I was wondering if there is anything I can change in the model to reduce the tail?
Perhaps with the priors or with a different distribution family.

I get a similar pp_check with higher iterations, and when setting the family as lognormal.

Thank you very much for any advice!

1 Like