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

randomisation function for the prior,
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. (2020).

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 quantification in Bayesian meta-analysis. Manuscript revised for Research Synthesis Methods. 2020.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Acute Graft rejection data analyzed in Friede et al. (2017), Sect. 3.2, 
# URL: https://doi.org/10.1002/bimj.201500236
df <- data.frame(y = c(-2.310, -1.258), # log-odds-ratio
                  sigma = c(0.599, 0.642), # SE(log-odds-ratio)
                  labels = c(1:2))

# MC sample of RLMC values
effective_rlmc(df=df, r.tau.prior=function(n)rhalfnormal(n=n, scale=1))  
# summary statistics for MC sample of RLMC values
effective_rlmc(df=df, r.tau.prior=function(n)rhalfnormal(n=n, scale=1), 
               output="summary")
# values for smoothed histogram of RLMC values
effective_rlmc(df=df, r.tau.prior=function(n)rhalfnormal(n=n, scale=1), 
               output="prob")

sl4bayesmeta documentation built on Feb. 18, 2020, 3:02 p.m.