"rma"
.## S3 method for class 'rma':
regtest(x, model="rma", predictor="sei", ni=NULL, \dots)
"rma"
."rma"
or "lm"
to indicate the type of model to use for the regression test. See "sei"
"vi"
, "ni"
, or "ninv"
to indicate the type of independent variable for the regression test. See predictor="ni"
or predictor="ninv"
and the object x
does not already contain this information."regtest.rma"
. The object is a list containing the following components:print.regtest.rma
function.regtest.rma
function can be used to carry out various versions of the regression test. The model is chosen via the model
argument, with model="lm"
for weighted regression with a multiplicative dispersion term or model="rma"
for the meta-analytic models. In the latter case, arguments such as method
, weighted
, and knha
used during the initial model fitting are also used for the regression test. Therefore, if one wants to conduct the regression test with a random-effects model, one should first fit a model with, for example, method="REML"
and then use the regtest.rma
function.
The predictor is chosen via the predictor
argument, with predictor="sei"
for the standard error, predictor="vi"
for the sampling variance, predictor="ni"
for the total sample size, and predictor="ninv"
for the inverse of the total sample size. The object x
will contain information about the total sample size when measure
was not equal to "GEN"
during the initial model fitting.
Finally, depending on what outcome measure was used for the model fitting will determine which outcome measure is used for the regression test.regtest
, ranktest
### load BCG vaccine data
data(dat.bcg)
### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat.bcg, append=TRUE)
### random-effects model
res <- rma(yi, vi, data=dat, method="FE")
regtest(res)
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat, method="REML")
regtest(res, model="lm", predictor="ni")
res <- rma(measure="PETO", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat, method="FE")
regtest(res, predictor="ninv")
res <- rma(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat, mods=cbind(ablat), method="REML")
regtest(res, predictor="ninv")
Run the code above in your browser using DataLab