# Non-normal random effects in a logistic GAM

I have estimated the following GAM using the mgcv package:

sex ~ factor + s(x0, by = factor, bs = "ps", k = 20) +
s(x1, bs = "ps", k = 20) + s(x2, bs = "ps",
k = 20) + s(x3, bs = "ps", k = 20) + s(x4, bs = "ps",
k = 20) + s(x5, bs = "ps", k = 20) + s(x6, bs = "ps",
k = 20) + s(mun, bs = "re") + s(region, bs = "mrf",
xt = xt)


However, when plotting the results, the random effect does not seem to follow a Gaussian distribution.

Is there a way to correct that to improve the model?

• What information, coming out of the model, are you hoping to improve? – whuber Nov 22 '18 at 15:08
• @whuber: I am guessing he would like the distribution of the random effects for municipalities (mun) to look closer to normal? 🤔 – Isabella Ghement Nov 22 '18 at 15:15
• Yes, that is exactly what I am looking for. Thanks Isabella – Johny Arm Nov 22 '18 at 15:17
• This article - albeit about GLMMs not GAMMs - may come in handy: arxiv.org/pdf/1201.1980.pdf. – Isabella Ghement Nov 22 '18 at 18:07
You may not want or need to worry about the departure from the normality assumption. Wood (2013) shows (in the Supplementary Materials, and mentioned in the text) that the test of the random effect term (as shown/performed in a call of summary() on the estimated GAM) is quite robust to failures of the normality assumption for the random effects.