Closed rvlenth closed 1 month ago
The brms issue also helped identify an additional issue with nuisance factors in general, and that is that they can't be used when emm_basis()
performs re-gridding, because the columns of X
are no longer associated with model terms.
This is a bug that was revealed in an issue with the brms package. There is a typo in the code for
.basis.nuis()
. In the case of multivariate models, we have an index setra
for the grid, and another indexRA
that is an expansion ofra
for the multivariate levels, and we used the wrong one in the final step where we pull out the relevant grid rows. This results in a corrupted grid.