Would we be able to estimate an error-in-variables in the equivalent of multi-level model in brm?
Alternatively, we might be able to work with each level separately.
Here, Level 2 is in a repeated cross-sectional design in which samples
are drawn independently in each time period. This can be framed as a
panel by defining cohorts (eg., combinations of demographic variables
that are constant in their definition overtime period). Can brms handle
EIV in the equivalent of a multi-level analysis ?
brms
seems to support measurement error for group-level terms, i.e. (extedning the example from https://rdrr.io/cran/brms/man/me.html):
N <- 100
dat <- data.frame(
y = rnorm(N), x1 = rnorm(N),
x2 = rnorm(N), sdx = abs(rnorm(N, 1)),
g = rep(c("a","b", length.out = N))
)
fit1 <-brm(y ~ me(x1, sdx) + (me(x1, sdx) || g)+ me(x2, sdx), data = dat,
save_mevars = TRUE)
Is that what you need? Or is “EIV” somehow different to what brms calls “measurement error”?