Description Usage Arguments Details Value References Examples
View source: R/effective_rlmc.R
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.
1 2 | effective_rlmc(df, r.tau.prior, MM = 10^6, output = "sample",
step = ifelse(output=="prob", 0.03, NULL))
|
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, |
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 |
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).
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").
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.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.