Trouble with Measurement Error in brms

I was playing with Measurement Error models in brms and extended the example from the documentation so the outcome is correlated with the predictors. Ran into fitting issues, divergent transitions. Figure I must be have something wrong.


N <- 100
dat <- data.frame(sdx = abs(rnorm(N, 0, 0.2)))

dat[['x1_real']] <- rnorm(N)
dat[['x2_real']] <- rnorm(N)

dat[['x1_meas']] <- rnorm(N,dat[['x1_real']],dat[['sdx']])
dat[['x2_meas']] <- rnorm(N,dat[['x2_real']],dat[['sdx']])

dat[['y']] <- dat$x1_real - dat$x2_real

# fit a simple error-in-variables model 
fit1 <- brm(bf(y ~ me(x1_meas, sdx) + me(x2_meas, sdx)) + set_mecor(FALSE) , data = dat, 
           save_mevars = TRUE,iter=6000,control=list(adapt_delta=0.95,max_treedepth=12))

R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bullseye/sid


Why have set_mecor(FALSE) when both predictors have the exact same measurement error term, sdx?

True set_mecor(FALSE) is not the right model for this data.
It doesn’t seem to make a difference for the model fit though.

It works when only one variable has measurement error.

fit1 <- brm(bf(y ~ me(x1_meas, sdx) +x2_meas) + set_mecor(TRUE) , data = dat, save_mevars = TRUE,iter=6000,control=list(adapt_delta=0.90,max_treedepth=14))