# Difference between mi() and se() for response measurement error

Hi,

I am trying to incorporate measurement uncertainty in some models, following the example in Statistical Rethinking (15.1) as shown here. I have read the discussion in this issue as well as Paul’s note about `mi()`'s functionality being expanded to handle both measurement error/noise as well as missing values and I am fairly confused about the differences (if any) between them. My understanding is that
`y.m | se(y.sd, sigma = TRUE)` and `y.m | mi(y.sd)` do the same thing. But then if I try to use `se(y.sd, sigma = TRUE)` for a model with a beta distribution I get

`Error: Argument 'se' is not supported for family 'beta(logit)'.`

However if I use `mi()` instead, `brm` proceeds without an issue, but I am concerned it does not do what I think it does.

So what is going on here, are there differences or are they interchangeable?

I think it could help people to answer you question if you posted the full model.

My understanding is that one would use `se()` in a meta-analysis context where one gets the error variance for the outcome from the data.

In contrast, `x | mi(sdy = se) ~ z` is used when you know the error variance of the covariate x (it is in the data). If you have only one predictor z with no missing data, this would be a measurement error model with know error variance of the covariate.

Lastly `x | mi() ~ z` would be a simple imputation model (some z are missing) or measurement error model (no z are missing) with estimated error variance.

To the best of my knowledge `mi()` supports only gaussian modelling.
Given that `se()` is the error variance of the outome, this also requires a gaussian model. This could explain the error message when you use the beta family.

``````Resp.mu|mi(Resp.sd) ~ 1 + cont + cat + cont:cat + (1 + cat|unit)
``````

where `cont` and `cat` are a continuous and a 3 level categorical predictor respectively.

I am a bit unsure what you main question is now.
I hope my earlier response could clarify that `se()` is not used to model measurement error, this is done with `me()` or `mi()`. To better understand where the error is comming from, one would need to see the full model, or even better a reproducible example (with fake data).

This seems to be only part of the model, because (a) there is no `family = beta(logit)` statement and (b) this is only the imputation model (for `Resp.mu`) and there is not outcome model in which the imputed values are used (e.g. `y ~ mi(Resp.mu) + ...` ).

As an aside, it seems unusual to me to have a measurement error model where the response variable `Resp.mu` is modeled by two different variables. I would have expected a mesurement error of this form:

``````bf(
y ~ mi(x.latent),
x.latent | mi(sdy = x.sd) ~ 0 + x.measured
)
``````

which should be the same as

``````y ~ se(x.measured, x.sd)
``````