Learn R Programming

RoBMA (version 3.5.1)

extract_posterior: Extract Posterior Samples from a RoBMA Model

Description

Extracts posterior samples for a specified parameter from a RoBMA model object.

Usage

extract_posterior(
  x,
  parameter = "mu",
  conditional = FALSE,
  output_scale = NULL,
  ...
)

Value

A matrix containing the posterior samples for the specified parameter.

Arguments

x

a fitted RoBMA object

parameter

a parameter for which posterior samples should be extracted. Defaults to "mu" (for the effect size). The additional options are "tau" (for the heterogeneity), "weightfunction" (for the estimated weightfunction), or "PET" and "PEESE" (for the PET-PEESE coefficients).

conditional

whether conditional estimates should be extracted. Defaults to FALSE which extracts the model-averaged estimates. Note that both "weightfunction" and "PET-PEESE" are always ignoring the other type of publication bias adjustment.

output_scale

transform the effect sizes and the meta-analytic effect size estimate to a different scale. Defaults to NULL which returns the same scale as the model was estimated on.

...

additional arguments passed to the method.

Examples

Run this code
if (FALSE) {
# Assuming 'fit' is a fitted RoBMA model:
posterior_mu <- extract_posterior(fit, parameter = "mu")
}

Run the code above in your browser using DataLab