Bug with nuisance factors in multivariate models
rvlenth opened this issue · 1 comments
rvlenth commented
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 set ra
for the grid, and another index RA
that is an expansion of ra
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.
rvlenth commented
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.