summary.bmr {bayesmeta} | R Documentation |
Summarizing a bmr
object).
Description
Summarizes a bmr
object, and (potentially) computes
means and predictions.
Usage
## S3 method for class 'bmr'
summary(object, X.mean, X.prediction, ...)
Arguments
object |
a |
X.mean |
a regressor matrix ( |
X.prediction |
an optional regressor matrix ( |
... |
other arguments. |
Details
Prints details of the supplied bmr
oject.
Specification of the (optional) “X.mean
” or
“X.prediction
” arguments allows to request computation
of mean estimates or predictions corresponding to the supplied
regressor matrices. Estimates (mode, median, mean, standard deviation,
and 95 percent CI) may be retrieved from the returned object's
“mean
” or “prediction
” elements (see
example below).
Value
A list (of class summary.bmr
) containing the following elements:
bmr |
the supplied |
call |
an object of class |
X.mean , X.prediction |
the ‘ |
mean , prediction |
mean and predictions estimates (mode, median, mean, sd, and 95 percent credible intervals) |
Author(s)
Christian Roever christian.roever@med.uni-goettingen.de
References
C. Roever, T. Friede. Using the bayesmeta R package for Bayesian random-effects meta-regression. Computer Methods and Programs in Biomedicine, 299:107303, 2023. doi:10.1016/j.cmpb.2022.107303.
Examples
## Not run:
# perform a meta-analysis using binary ("indicator") covariables;
# load data:
data("CrinsEtAl2014")
# compute effect measures (log-OR):
crins.es <- escalc(measure="OR",
ai=exp.AR.events, n1i=exp.total,
ci=cont.AR.events, n2i=cont.total,
slab=publication, data=CrinsEtAl2014)
# specify regressor matrix (binary indicator variables):
X <- cbind("basiliximab"=as.numeric(crins.es$IL2RA=="basiliximab"),
"daclizumab" =as.numeric(crins.es$IL2RA=="daclizumab"))
print(X)
# perform meta-analysis:
bmr01 <- bmr(crins.es, X=X,
tau.prior=function(t){dhalfnormal(t, scale=0.5)})
# show summary:
summary(bmr01)
# show summary with additional estimates and predictions:
summary(bmr01,
X.mean = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1),
"difference" = c(-1,1)),
X.pred = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1)))
# compute mean estimates
smry <- summary(bmr01,
X.mean = rbind("basiliximab" = c(1,0),
"daclizumab" = c(0,1),
"difference" = c(-1,1)))
# show mean estimates:
smry$mean
## End(Not run)