# Brms gaussian process se() with log\_normal

**URL:** https://discourse.mc-stan.org/t/brms-gaussian-process-se-with-log-normal/40173
**Category:** Modeling
**Tags:** gaussian-process, brms
**Created:** [August 15, 2025, 10:17am UTC](https://discourse.mc-stan.org/t/brms-gaussian-process-se-with-log-normal/40173 "2025-08-15T10:17:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![buf](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/buf/32/18551_2.png) [@buf](https://discourse.mc-stan.org/u/buf)
#### Post date: [August 15, 2025, 10:17am UTC](https://discourse.mc-stan.org/t/brms-gaussian-process-se-with-log-normal/40173/1 "2025-08-15T10:17:57Z")

</div>

Hi there,

I try to build a GP model with brms. It is about nitrate concentrations in groundwater that shall be interpolated in space using GP. I have information on measurement errors for each observation. If the nitrate concentrations were normally distributed, I think I could use this code:

```r
cp4 <- c(prior(normal(40, 5), class = Intercept),
         prior(exponential(0.5), class = sigma),
         prior(inv_gamma(4, 15), class = lscale, coef = 'gpX_kmY_km'),
         prior(normal(0, 50), class = sdgp, lb = 0))

final_gl_fit <- brm(data = all_data,
                    family = gaussian,
                    new_value | se(sd_diff, sigma = TRUE) ~ gp(X_km, Y_km, k = 30, cov = 'exp_quad', iso = TRUE, c = 5/4, scale = FALSE),
                    chains = 4, cores = 4, iter = 2000, seed = 393,
                    prior = cp4,
                    sample_prior = TRUE,
                    control = list(adapt_delta = 0.8, max_treedepth = 12))

```

However, the nitrate concentrations are not normally distributed but rather log-normal. My question here is how to incorporate the measurement error into a gaussian process model of family log\_normal (se() only works for family = gaussian).

Cheers,

Friedrich
