https://github.com/cran/metafor
Tip revision: 71ae0c191f9d9b3dbb7689785f18d0d81511ecde authored by Wolfgang Viechtbauer on 19 March 2020, 21:30:10 UTC
version 2.4-0
version 2.4-0
Tip revision: 71ae0c1
formula.rma.r
formula.rma <- function(x, type="mods", ...) {
mstyle <- .get.mstyle("crayon" %in% .packages())
if (!inherits(x, "rma"))
stop(mstyle$stop("Argument 'x' must be an object of class \"rma\"."))
type <- match.arg(type, c("mods", "yi", "scale"))
if (x$model=="rma.ls" && type=="scale")
stop(mstyle$stop("Can only use type='scale' for location-scale models."))
if (type == "mods")
return(x$formula.mods)
if (type == "yi")
return(x$formula.yi)
if (type == "scale")
return(x$formula.scale)
}