dat.berkey1998
numeric
trial number
author character
study author(s)
year numeric
publication year
ni numeric
number of patients
outcome character
outcome (PD = probing depth; AL = attachment level)
yi numeric
observed mean difference in outcome (surgical versus non-surgical)
v1i numeric
variances and covariances of the observed effects
v2i numeric
variances and covariances of the observed effects
}v1i
and v2i
values are the variances and covariances of the observed effects. In particular, for each study, variables v1i
and v2i
form a $2 \times 2$ variance-covariance matrix of the observed effects, with the diagonal elements corresponding to the sampling variances of the mean differences (the first for probing depth, the second for attachment level) and the off-diagonal value corresponding to the covariance of the two mean differences. Below, the full (block diagonal) variance-covariance for all studies is constructed from these two variables.### load data
dat <- get(data(dat.berkey1998))
### construct list of the variance-covariance matrices of the observed outcomes for the studies
V <- lapply(split(dat[,c("v1i", "v2i")], dat$trial), as.matrix)
### construct block diagonal matrix
V <- bldiag(V)
### fit multiple outcomes (meta-regression) model (with ML estimation)
res <- rma.mv(yi, V, mods = ~ outcome + outcome:I(year - 1983) - 1,
random = ~ outcome | trial, struct="UN", data=dat, method="ML")
print(res, digits=3)
Run the code above in your browser using DataLab