Discontinuity with circular smooth (GAM)

Just to clarify for @JMeekes: mgcv won’t rescale, but it will select the positions of the internal knots to be appropriate to your scale, so that the wiggliness gets rescaled in a data-dependent way, as you’d expect. There are two main reasons it’s advantageous to rescale the data in Stan. One is to enable easier prior-setting, and better behavior under default priors. I don’t think that matters here, but it would be a good idea ensure that your prior model looks reasonable in any case. For more on priors in brms GAMs, see here Better priors (non-flat) for GAMs (brms) - #4 by ucfagls

The second reason is that it is mildly advantageous to have a posterior whose scale is close to that of a standard normal, since that’s the starting point for Stan’s metric adaptation. I simply don’t know enough about how these basis functions and random effects work to say off the top of my head whether rescaling matters here or not. However, this is not a hugely important point, since Stan’s metric adaptation should be able to update to alternative scales reasonably rapidly.

2 Likes