fit_models_RA_5bm: Model fitting for reference analysis using 5 benchmarks:...

View source: R/fit_models_RA_5bm.R

fit_models_RA_5bmR Documentation

Model fitting for reference analysis using 5 benchmarks: Posterior inference for benchmark and actual heterogeneity priors

Description

Computes the posterior distribution of the parameters in a random-effects meta-analysis (expressed as a normal-normal hierarchical model) for each of five benchmark heterogeneity priors and the actual heterogeneity prior(s) specified. Applies the function bayesmeta from the package bayesmeta.

Usage

fit_models_RA_5bm(df, tau.prior=list(), compute.J.bm=TRUE,
                  m_J=NA, M_J=NA, upper.J=3, digits.J=2,
                  m_inf=NA, M_inf=NA, rlmc0=0.0001, rlmc1=0.9999,
                  mu.mean=0, mu.sd=4)

Arguments

df

data frame with one column "y" containing the (transformed) effect estimates for the individual studies and one column "sigma" containing the standard errors of these estimates.

tau.prior

list of prior specifications, which are either functions returning the probability densities of the actual priors of interest for the heterogeneity parameter tau or character strings specifying priors implemented in the bayesmeta function. See the documentation of the argument tau.prior of the bayesmeta function for details.

compute.J.bm

logical. Specifies if the parameter values of the two benchmarks priors SGC(m_J) and SIGC(M_J) and the corresponding marginal posteriors should be computed. Defaults to TRUE.

m_J

parameter value m=m_J of the SGC(m) prior, which induces a marignal posterior for the heterogeneity standard deviation tau close to Jeffreys reference posterior (wrt the Hellinger distance). If set to NA (the default), this parameter is computed using the function m_j_sgc and the arguments df, upper.J, digits.J, mu.mean and mu.sd.

M_J

parameter value M=M_J of the SIGC(M) prior, which induces a marignal posterior for the heterogeneity standard deviation tau close to Jeffreys reference posterior (wrt the Hellinger distance). If set to NA (the default), this parameter is computed using the function M_j_sigc and the arguments df, upper.J, digits.J, mu.mean and mu.sd.

upper.J

upper bound for the parameters M_J and m_J. Real number in (1,\infty). Is required only if M_J=NA or m_J=NA.

digits.J

specifies the desired precision of the parameter values M_J and m_J, i.e. to how many digits these two values should be determined. Possible values are 1,2,3. Defaults to 2. Is required only if M_J=NA or m_J=NA.

m_inf

parameter value m=m_{inf} of the SGC(m) prior, such that the median relative latent model complexity (RLMC) is close to 0. If set to NA (the default), this parameter is computed using the function m_inf_sgc, such that the median RLMC is approximately equal to rlmc0.

M_inf

parameter value M=M_{inf} of the SIGC(M) prior, such that the median relative latent model complexity (RLMC) is close to 1. If set to NA (the default), this parameter is computed using the function M_inf_sigc, such that the median RLMC is approximately equal to rlmc1.

rlmc0

RLMC target value for the SGC(m_{inf}) benchmark prior (typically close to 0). Is required only if m_inf=NA.

rlmc1

RLMC target value for the SIGC(M_{inf}) benchmark prior (typically close to 1). Is required only if M_inf=NA.

mu.mean

mean of the normal prior for the effect mu.

mu.sd

standard deviation of the normal prior for the effect mu.

Details

The five heterogeneity benchmark priors used are introduced in the Supplementary Material of Ott et al. (2021, Sections 2.2.1, 2.5 and 2.6, see also Section 3.4 of Ott et al. (2021) for Jeffreys reference prior), where they are denoted by SGC(m_{inf}), SIGC(M_J), SGC(m_J), SIGC(M_{inf}) and Jeffreys. Note that "Jeffreys" refers to Jeffreys reference prior, which is improper, but leads to a proper posterior if there are at least two studies in the meta-analysis data set.

If the fits induced by the SIGC(M_J) and SGC(m_J) benchmarks are not needed for the analysis (such as for the posterior reference analysis proposed in the Supplementary Material of Ott et al. (2021), see for example Table 8 for illustration), specifying compute.J.bm=FALSE may reduce the computation time by several minutes.

The default values for mu.mean and mu.sd are suitable for effects mu on the log odds (ratio) scale.

Value

A list with two elements: The first element named "fits" is a list containing the model fits and the second element called "par" is a named vector giving the parameter values of the benchmark priors. The vector "par" has the following five components: m_inf, M_J, m_J, M_inf and C.

The element "fits" is a list of lists of class bayesmeta. This list has length 5 + length(tau.prior) and contains one element for each heterogeneity prior considered (5 benchmark priors and the actual priors specified), in the following order:

fit.SGC.m_inf

for SGC(m_inf) benchmark prior

fit.SIGC.M_J

for SIGC(M_J) benchmark prior

fit.SGC.m_J

for SGC(m_J) benchmark prior

fit.SIGC.M_inf

for SIGC(M_inf) benchmark prior

fit.j

for Jeffreys (improper) reference prior

fit.actual_1

for the first prior in the list tau.prior (if specified)

fit.actual_2

for the second prior in the list tau.prior (if specified)

...

...

fit.actual_n

for the nth prior in the list tau.prior (if specified)

See bayesmeta in the package bayesmeta for information on the structure of the lists of class bayesmeta.

Warning

This function may take several minutes to run if the parameter m_J and/or M_J is not specified, especially if the desired precision is digits.J=2 or even digits.J=3.

If fit_models_RA ends with an error or warning, we recommend to check the values of the parameters M_J, m_J and M_inf for the benchmark priors. The choice of these parameters can be studied by using the functions M_j_sigc, m_j_sgc and M_inf_sigc. If one of the parameters m_inf, M_J, m_J or M_inf has a value larger than 5*10^6, a warning message will be displayed, since such large parameter values may lead to numerical problems in the bayesmeta function.

References

Ott, M., Plummer, M., Roos, M. (2021). Supplementary Material: How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Statistics in Medicine. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.9076")}

Ott, M., Plummer, M., Roos, M. (2021). How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Statistics in Medicine 40, 4505–4521. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.9076")}

See Also

bayesmeta in the package bayesmeta, m_j_sgc, M_j_sigc, m_inf_sgc, M_inf_sigc

Examples

# for aurigular acupuncture (AA) data set with one
# actual half-normal and the "DuMouchel" heterogeneity prior
data(aa)
# warning: it takes ca. 7 min. to run this function
fit_models_RA_5bm(df=aa, tau.prior=list(function(t)dhalfnormal(t, scale=1),
                                        "DuMouchel"))

# computation is much faster if m_J and M_J are specified
fit_models_RA_5bm(df=aa, tau.prior=list(function(t)dhalfnormal(t, scale=1),
                                        "DuMouchel"),
                  m_J = 1.35, M_J = 1.3)


ra4bayesmeta documentation built on Oct. 7, 2023, 1:07 a.m.