I want to predict a response variable y, from a predictor x and it’s square, when I have error in the measurement of x. This is all in the context of hierarchical ordinal regression. Since the formula syntax becomes a bit complicated, I wanted to make sure my implementation indeed does what I mean:
y ~ 1 + me(x, sdx, item) + I(me(x, sdx, item)^2) +
(1 + me(x, sdx, item) + I(me(x, sdx, item)^2) | participant) +
(1 | item)
So above, I have y predicted by the latent variable underlying observations x, and it’s square. Intercepts and the two polynomial slopes vary by participant, intercept varies by item as well.
Is that correct? Is that the best implementation (I know that mi() does something similar, but I’m not sure when/how to use it).
Thanks!
- Operating System: macosx 10.14.6
- brms Version: 2.12.0