I’ve fit a multivariate model where different parts of the dataset are modeled separately using the subset() function; however when I try to use posterior_epred to get by-subject BLUPs, I get an error
"Error: All rows of 'data' were removed via 'subset'. Please make sure that variables do not contain NAs for observations in which they are supposed to be used. Please also make sure that each subset variable is TRUE for at least one observation.
In the dataset I’m predicting on, I have basically the same setup as in the original dataset I fit the model to, except just one row per subject. The code I’m using is
b_e ← posterior_epred(multivar, newdata = blick_persons_e, scale = “linear”,re_formula = ~(1|SubjectID), resp = “factorResponseblickorderedTRUE”)