effective_rlmc: Effective relative latent model complexity computation

Description Usage Arguments Details Value References Examples

View source: R/effective_rlmc.R

Description

Generates a Monte Carlo sample of relative latent model complexity (RLMC) values for the given meta-analysis data set and the prior distribution for the between-study standard deviation. Can also return estimates for plotting a smoothed histogram of effective RLMC values. Assumes a Bayesian normal-normal hierarchical model.

Usage

1
2
effective_rlmc(df, r.tau.prior, MM = 10^6, output = "sample",
               step = ifelse(output=="prob", 0.03, NULL))

Arguments

df

data frame with one column "sigma" containing the standard errors of the estimates for the individual studies

r.tau.prior

function to generate random samples from the heterogeneity prior of interest,
e.g. function(n) rhalfnormal(n=n, scale=1) for the HN prior with scale parameter 1

MM

number of MC samples. Defaults to 10^6.

output

either "sample" or "summary" or "prob". Specifies the type of output. "sample" returns the MC samples of RLMC values, "summary" gives summary statistics of the MC samples and "prob" provides x- and y-values for plotting a smoothed histogram

step

bin width for output="prob"

Details

For the definition of RLMC and further information, see Ott et al. (2021, Sections 3.3 and 3.4) and the Supplementary Material of that manuscript (Section 4.3).

Value

If output=="sample": a vector of size MM of RLMC values.

If output=="summary": summary statistics for the MC samples (minimum, first quantile, median, mean, third quantile and maximum).

If output=="prob": a data frame with columns "x" and "y", giving the values in the middle of the bins ("x") and the corresponding "density estimates" ("y").

References

Ott, M., Hunanyan, S., Held, L., Roos, M. Sensitivity-based identification of inaccurate heterogeneity priors in Bayesian meta-analysis. Submitted to Statistical Methods in Medical Research. 2021.

Ott, M., Hunanyan, S., Held, L., Roos, M. Supplementary Material: Sensitivity-based identification of inaccurate heterogeneity priors in Bayesian meta-analysis. Submitted to Statistical Methods in Medical Research. 2021.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# load the steriod-resistant rejection (SRR) data analyzed in Friede et al. (2017)
data(srr)

# for the HN(1) heterogeneity prior and the SRR data, compute the following:
# MC sample of RLMC values
effective_rlmc(df = srr, 
               r.tau.prior = function(n) rhalfnormal(n=n, scale=1))  
# summary statistics for MC sample of RLMC values
effective_rlmc(df = srr, 
               r.tau.prior = function(n) rhalfnormal(n=n, scale=1), 
               output = "summary")
# values for smoothed histogram of RLMC values
effective_rlmc(df = srr, 
               r.tau.prior = function(n) rhalfnormal(n=n, scale=1), 
               output = "prob")

pa4bayesmeta documentation built on Aug. 1, 2021, 3 p.m.