ExtractParameters {publipha} | R Documentation |
Extract Parameters from an mafit
Object
Description
Extract samples from a model of class mafit
and apply a
function fun
to them.
Usage
extract_theta0(object, fun = mean)
extract_theta(object, fun = mean, i)
extract_tau(object, fun = mean)
extract_eta(object, fun = mean, i)
extract_isq(object, fun = mean)
Arguments
object |
an object of class |
fun |
the function to be applied to the fitted parameters. |
i |
an optional index specifying which parameter to apply |
Details
Support parameters for extraction are: The meta-analytic mean theta0
, the
individual means theta
, the heterogeneity parameter tau
, the selection
bias parameter eta
, and the I squared isq
. See Higgins and Thompson
(2002) for details about I squared.
All extract_
functions are wrappers
around rstan::extract
.
Value
The result of FUN
being applied to all estimated parameters of
object
.
References
Higgins, J. P., & Thompson, S. G. (2002). Quantifying heterogeneity in a meta-analysis. Statistics in medicine, 21(11), 1539-1558.
Examples
set.seed(313)
model <- publipha::psma(yi = yi, vi = vi, data = dat.baskerville2012)
extract_theta0(model, mean) # [1] extract_theta0(model, mean)
extract_theta0(model, sd) # [1] 0.1095921
extract_tau(model, mean) # [1] 0.1315312
extract_theta(model, hist, i = 5)