Closed strengejacke closed 5 years ago
It is not clear what predictions are you exactly looking for, but the id
variable should be set. In addition, you fit a model with a binary outcome, but the y
you provide in nd
is not a 0 or a 1 but the proportion of ones in DF
. This is why it complains for non-integer values in `dbinom().
When you select subject-specific predictions, predict()
will estimate the random effects for each subject in nd
given their observed outcome measurements y
, and based on these estimated random effects and the other covariates in nd
, it will produce predictions.
Ah, ok. y
needs to be 0 or 1, than it works (id
can still be NA
though).
I'm not sure whether the random slope, or the model fit itself is the cause of this error?
Created on 2019-01-17 by the reprex package (v0.2.1)