Closed kthayashi closed 3 months ago
I think this question is better asked on stan discourse.
Thank you for the suggestion - I've now posted this question on the Stan Discourse: https://discourse.mc-stan.org/t/unexpected-behavior-of-emtrends-with-brms-models-with-me-vs-mi/34525
I've encountered (what I think might be) unexpected behavior when using
emmeans
(specificallyemtrends()
here) withbrms
measurement error models. I'm not totally sure if this is abrms
oremmeans
issue, but I'm opening it here since it seems to be associated with multivariatebrms
models withmi()
terms.The issue arises when trying to calculate the effect of some predictor variable that has measurement error, e.g.
emtrends(fit_mi, ~ xobs, var = "xobs", resp = "y")
. Some observations are that (1) the result of this function call changes between calls, (2) the estimated trend is often quite off from the corresponding slope coefficient, and (3) the reported lower/upper HPD have very large magnitudes relative to the estimated trend. Perhaps the first point has to do with the measurement error associated withxobs
, but I'm not sure if/how this can be controlled when calculatingemmeans
/emtrends
, and I'm really not sure what's going on with the other points.Here's a reproducible example:
Session info: