Residual pattern

Hi, I am fitting GAMM with Gamma family to my data. I am currently doing residual check.
However, the residual against covariate plot shows very weird pattern:

Could someone give me some suggestions on what should I do?

Many thanks!

HI, @yuwenhuang717. Could you be more specific of how you fit the GAMM with Stan? Ideally with reproducible code that leads to the above plot. Thanks!