metafor (version 1.9-9)

blup: Best Linear Unbiased Predictions for 'rma.uni' Objects

Description

The function calculates best linear unbiased predictions (BLUPs) of the true outcomes by combining the fitted values based on the fixed effects and the estimated contributions of the random effects for objects of class "rma.uni". Corresponding standard errors and prediction interval bounds are also provided.

Usage

blup(x, ...)
"blup"(x, level, digits, transf, targs, ...)

Arguments

x
an object of class "rma.uni".
level
numerical value between 0 and 100 specifying the prediction interval level (if unspecified, the default is to take the value from the object).
digits
integer specifying the number of decimal places to which the printed results should be rounded (if unspecified, the default is to take the value from the object).
transf
optional argument specifying the name of a function that should be used to transform the predicted values and interval bounds (e.g., transf=exp; see also transf). If unspecified, no transformation is used.
targs
optional arguments needed by the function specified under transf.
...
other arguments.

Value

An object of class "list.rma". The object is a list containing the following components:The "list.rma" object is formated and printed with print.list.rma.

References

Kackar, R. N., & Harville, D. A. (1981). Unbiasedness of two-stage estimation and prediction procedures for mixed linear models. Communications in Statistics, Theory and Methods, 10, 1249--1261.

Raudenbush, S. W., & Bryk, A. S. (1985). Empirical Bayes meta-analysis. Journal of Educational Statistics, 10, 75--98.

Robinson, G. K. (1991). That BLUP is a good thing: The estimation of random effects. Statistical Science, 6, 15--32.

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

rma.uni, predict.rma, fitted.rma, ranef.rma.uni

Examples

Run this code
### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### meta-analysis of the log relative risks using a random-effects model
res <- rma(yi, vi, data=dat)

### BLUPs of the true relative risks for each study
blup(res, transf=exp)

### illustrate shrinkage of BLUPs towards the (estimated) population average
res <- rma(yi, vi, data=dat)
blups <- blup(res)$pred
plot(NA, NA, xlim=c(.8,2.4), ylim=c(-2,0.5), pch=19,
     xaxt="n", bty="n", xlab="", ylab="Log Relative Risk")
segments(rep(1,13), dat$yi, rep(2,13), blups, col="darkgray")
points(rep(1,13), dat$yi, pch=19)
points(rep(2,13), blups, pch=19)
axis(side=1, at=c(1,2), labels=c("Observed\nValues", "BLUPs"), lwd=0)
segments(.7, res$b, 2.15, res$b, lty="dotted")
text(2.3, res$b, expression(hat(mu)==-0.71), cex=1)

Run the code above in your browser using DataLab