Skip to content
Prev 16228 / 20628 Next

prediction with glmer

In terms of the random effects: it depends on the other arguments to
predict() (in particular re.form) as to whether they are marginalized
out or not (i.e. whether it's a pure fixed-effects prediction).


My understanding is:
If you only the same levels of your grouping variable occur in the new
data as occurred in the old data (i.e. the data used to fit the model),
then the conditional modes / BLUPs (BLUP is a bit of a misnomer in the
GLMM case, and conditional mode is a fairly Bayesian perspective in a
frequentist model) estimated for each level of the grouping variable
(study_no in your case) are used.
With new levels, predictions are made using the variance estimates and
not the particular offsets / conditional modes / BLUPs.

However, in your particular case, it's even easier: predict simply
returns the fitted values.

Phillip
On 22/02/18 11:43, Schlattmann, Peter wrote: