Setting nug for GP regressions

I sometimes receive the following error when generating conditional effects after training a GP regression model like brm(y ~ gp(x))

Error: The Gaussian process covariance matrix is not positive definite. This occurs for numerical reasons. Setting ‘nug’ above 1e-12 may help.

I cannot find documentation about how to set nug to something other than the default value. Passing the option into brm() or gp() did not work.

Can someone please provide an example of how to set nug to a larger value?

Before setting parameters like that, be sure that your data and model are all in order. If the model is fitting well, but conditional_effects calls are failing, there might be something in your data. But based on this, I’m not sure the model is fitting well.

This is a consequence of some inputs being extremely close together. I am just looking for a way to work with the error message as it is given to me.

‘nug’ is specific to GPs alone in the brms documentation, and modifying jitter is a normal part of exploring GP specifications, so I would hope this has an easy implementation even if documentation for altering this parameter doesn’t exist yet.