blup.mixmeta {mixmeta} | R Documentation |
Best Linear Unbiased Predictions from mixmeta Models
Description
This method function computes (empirical) best linear unbiased predictions from fitted random-effects meta-analytical models represented in objects of class "mixmeta"
. Quantities can represent prediction of outcomes given both fixed and random effects, or just random-effects residuals from the fixed-effects estimates. Predictions are optionally accompanied by standard errors, prediction intervals or the entire (co)variance matrix of the predicted outcomes.
Usage
## S3 method for class 'mixmeta'
blup(object, se=FALSE, pi=FALSE, vcov=FALSE, pi.level=0.95, type="outcome",
level, format, aggregate="stat", ...)
Arguments
object |
an object of class |
se |
logical switch indicating if standard errors must be included. |
pi |
logical switch indicating if prediction intervals must be included. |
vcov |
logical switch indicating if the (co)variance matrix must be included. |
pi.level |
a numerical value between 0 and 1, specifying the confidence level for the computation of prediction intervals. |
type |
the type of prediction. This can be either |
level |
level of random-effects grouping for which predictions are to be computed. Default to the highest (inner) level, with 0 corresponding to fixed-effects predictions obtained through |
format |
the format for the returned results. See Value. |
aggregate |
when |
... |
further arguments passed to or from other methods. |
Details
The method function blup
produces (empirical) best linear unbiased predictions from mixmeta
objects. These can represent outcomes, given by the sum of fixed and random parts, or just random-effects residuals representing deviations from the fixed-effects estimated outcomes. In non-standard models with multiple hierarchies of random effects, the argument level
can be used to determine the level of grouping for which predictions are to be computed.
These predictions are a shrunk version of unit-specific realizations, where unit-specific estimates borrow strength from the assumption of an underlying (potentially multivariate) distribution of outcomes or residuals in a (usually hypothetical) population. The amount of shrinkage depends from the relative size of the within and between-unit covariance matrices reported as components S
and Psi
in mixmeta
objects (see mixmetaObject
).
Fixed-effects models do not assume random effects, and the results of blup
for these models are identical to predict
(for type="oucome"
) or just 0's (for type="residuals"
).
How to handle predictions for units removed from estimation due to invalid missing pattern is determined by the na.action
argument used in mixmeta
to produce object
. If na.action=na.omit
, units excluded from estimation will not appear, whereas if na.action=na.exclude
they will appear, with values set to NA
for all the outcomes. This step is performed by napredict
. See Note below.
In the presence of missing values in the outcomes y
of the fitted model, correspondent values of point estimates and covariance terms are set to 0, while the variance terms are set to 1e+10
. In this case, in practice, the unit-specific estimates do not provide any information (their weight is virtually 0), and the prediction tends to the value returned by predict
with interval="prediction"
, when applied to a new but identical set of predictors. See also Note below.
Value
(Empirical) best linear unbiased predictions of outcomes or random-effects residuals. The results may be aggregated in matrices (the default), or returned as lists, depending on the argument format
. For multivariate models, the aggregation is ruled by the argument aggregate
, and the results may be grouped by statistic or by outcome. If vcov=TRUE
, lists are always returned.
Note
The definition of missing in model frames used for estimation in mixmeta
is different than that commonly adopted in other regression models such as lm
or glm
. See info on missing values
in mixmeta
.
Differently from predict
, this method function computes the predicted values in the presence of partially missing outcomes. Interestingly, BLUPs for missing outcomes may be slightly different than predictions returned by predict
on a new but identical set of predictors, as the BLUP also depends on the random part of the model. Specifically, the function uses information from the random-effects (co)variance to predict missing outcomes given the observed ones.
Author(s)
Antonio Gasparrini <antonio.gasparrini@lshtm.ac.uk> and Francesco Sera <francesco.sera@lshtm.ac.uk>
References
Sera F, Armstrong B, Blangiardo M, Gasparrini A (2019). An extended mixed-effects framework for meta-analysis.Statistics in Medicine. 2019;38(29):5429-5444. [Freely available here].
Verbeke G, Molenberghs G. Linear Mixed Models for Longitudinal Data. Springer; 1997.
See Also
See predict
for standard predictions. See mixmeta-package
for an overview of the package and modelling framework.
Examples
# RUN THE MODEL
model <- mixmeta(cbind(PD,AL) ~ 1, S=berkey98[5:7], data=berkey98)
# ONLY BLUP
blup(model)
# BLUP AND SE
blup(model, se=TRUE)
# SAME AS ABOVE, AGGREGATED BY OUTCOME, WITH PREDICTION INTERVALS
blup(model, se=TRUE, pi=TRUE, aggregate="outcome")
# WITH VCOV, FORCED TO A LIST
blup(model, se=TRUE, pi=TRUE, vcov=TRUE, aggregate="outcome")
# PREDICTING ONLY THE RANDOM-EFFECT RESIDUALS
blup(model, type="residual")