The predictions at level i are obtained by adding together the
population predictions
(based only on the fixed effects estimates)
and the estimated contributions of the random effects to the
predictions at grouping levels less or equal to i.
If group values not included in the original grouping factors
are present in
newdata,
the corresponding predictions will be set to
NA
for levels greater or equal to the level at which the unknown groups occur.
an object inheriting from class
glme,
representing a fitted generalized linear mixed-effects model.
newdata
an optional data frame to be used for obtaining the predictions.
All variables used in the fixed and random effects models,
as well as the grouping factors, must be present in the data frame.
If missing, the fitted values are returned.
level
an optional integer vector giving the level(s) of grouping
to be used in obtaining the predictions.
Level values increase from outermost to innermost grouping,
with level zero corresponding to the population predictions.
Defaults to the highest or innermost level of grouping.
asList
an optional logical value.
If
TRUE and a single value is given
in
level,
the returned object is a list with the predictions split by groups;
else the returned value is either a vector or a data frame,
according to the length of
level.
type
an optional character string indicating the type of predicted
values to be obtained for the
glme fit,
with choices
"response"
and
"link".
Partial matching of arguments is used,
so only the first character needs to be provided.
Default is
"response".
na.action
a function that indicates what should happen
when
newdata
contains
NAs.
The default action (
na.fail)
causes the function to print an error message
and terminate if there are any incomplete observations.
VALUE:
if a single level of grouping is specified
in
level,
the returned value is either a list with the predictions split by groups
(
asList=TRUE)
or a vector with the predictions (
asList=FALSE);
else, when multiple grouping levels are specified
in
level,
the returned object is a data frame with columns given
by the predictions at different levels and the grouping factors.