Description Usage Arguments Details Value Warning Note References See Also Examples
View source: R/sensitivity_learning_table_flexible.R
Generates a table containing posterior, sensitivity and learning estimates and
effective RLMC
values
for a meta-analysis data set with effect expressed as log-odds ratios or log-odds.
Is a generalized version of the sensitivity_learning_table()
function, which enables a flexible choice of multiple parameters
that are fixed in the latter function.
This function supports computation of the reference within-study standard deviation
based on both the geometric mean (the default) and a weighted harmonic mean.
Assumes a Bayesian normal-normal hierarchical model with different
priors (half-normal, exponential, half-Cauchy and Lomax) for the between-study standard deviation.
These priors are either tail_alpha_static
-tail adjusted or adjusted to a target RLMC value
(with respect to a tail probability tail_alpha_dynamic
).
1 2 3 4 5 6 7 8 | sensitivity_learning_table_flexible(df, tail_alpha_static=0.04550026,
U1=1, U2=2,
tail_alpha_dynamic=0.5,
rlmc1=0.25, rlmc2=0.5,
scale_effect="OR",
type_sigma_ref="geometric",
mu_mean=0, mu_sd=4,
grid_epsilon=0.00354)
|
df |
a data frame containing a column "y" with the estimates of the log-odds (ratios) for the individual studies, a column "sigma" with the corresponding standard errors and a column "labels" with labels for the studies |
tail_alpha_static |
tail probability for the static heterogeneity prior tail-adjustment |
U1 |
first reference threshold for the static tail-adjustment |
U2 |
second reference threshold for the static tail-adjustment |
tail_alpha_dynamic |
tail probability for the dynamic heterogeneity prior adjustment based on RLMC. The default 0.5 corresponds to a median-based adjustment. |
rlmc1 |
first target value for RLMC |
rlmc2 |
second target value for RLMC |
scale_effect |
either |
type_sigma_ref |
either |
mu_mean |
mean of the normal prior for the effect mu on the log-odds (ratio) scale. Defaults to 0. |
mu_sd |
standard deviation of the normal prior for the effect mu on the log-odds (ratio) scale. Defaults to 4. |
grid_epsilon |
step size of the grid for the epsilon-local sensitivity computation. |
The sensitivity measure used is epsilon-local sensitivity (Roos et al. 2015), which is based on the Hellinger distance. Here, learning refers to the ability of the data to modify the prior. It is quantified by the Hellinger distance between the prior and its marginal posterior. See Ott et al. (2020) for a description of the implemented methodology and some examples. Since the sensitivity and learning measures are invariant with respect to monotone transformations of the parameter, the sensitvity and learning estimates do not change if we switch from the odds (ratio) scale to the log-odds (ratio) scale or vice versa.
The shape parameter of the Lomax prior is fixed at 1.
The posterior estimates are obtained from the bayesmeta()
function
in the package bayesmeta
.
The default values of the parameters correspond
to the values used in the basic
sensitivity_learning_table
()
function.
These values have been chosen as follows:
for tail_alpha_static
, the default value is based
on the half-normal prior with scale parameter 0.5 and the reference threshold
U1=1: we have P[HN(0.5)>1]=0.04550026.
For the mean and the standard deviation
of the normal prior for the effect mu, we use the default values
recommended by Roever (2018) for outcomes on the log-odds ratio scale,
which are also suitable for the log-odds scale.
For grid_epsilon
, the default value 0.00354 corresponds to the
Hellinger distance between two unit-variance normal distributions
with means 0 and 0.01 (Roos et al., 2015).
A matrix with the different estimates in the columns and
one row per heterogeneity prior (i.e. the prior for the between-study standard deviation).
If scale_effect="OR"
,
the quantities given in the columns are as follows, where
OR=exp(mu) denotes the effect on the odds ratio or odds scale and
tau the heterogeneity standard deviation:
U |
reference threshold for prior adjustment |
tail_prob |
tail probability for prior adjustment |
par_val |
scale parameter value of the heterogeneity prior |
MRLMC |
median relative latent model complexity estimated from MC sampling |
median_post_OR |
posterior median for the effect OR-exp(mu) |
95CrI_post_OR_low |
lower end point of the 95 % shortest credible interval (CrI) for the effect OR |
95CrI_post_OR_up |
upper end point of the 95 % shortest CrI for the effect OR |
length_95CrI_post_OR |
length of the 95 % shortest CrI for the effect OR |
median_post_tau |
posterior median for tau |
95CrI_post_tau_low |
lower end point of the 95 % shortest CrI for tau |
95CrI_post_tau_up |
upper end point of the 95 % shortest CrI for tau |
length_95CrI_post_tau |
length of the 95 % shortest CrI for tau |
L_mu |
learning estimate for the effect mu |
L_tau |
learning estimate for tau |
S_mu |
sensitivity estimate for the effect mu |
S_tau |
sensitivity estimate for tau |
If scale_effect="logOR"
,
then the estimates in columns 5-8 and the corresponding column names are adapted as follows
(the remaining columns remain unchanged), where
mu denotes the effect on the
log-odds ratio or log-odds scale:
median_post_mu |
posterior median for the effect mu |
95CrI_post_mu_low |
lower end point of the 95 % shortest credible interval (CrI) for the effect mu |
95CrI_post_mu_up |
upper end point of the 95 % shortest CrI for the effect mu |
length_95CrI_post_mu |
length of the 95 % shortest CrI for the effect mu |
The following heterogeneity priors are given in the rows (from top to bottom):
HN_U1tail, EXP_U1tail, HC_U1tail, LMX_U1tail |
half-normal, exponential, half-Caucy and Lomax prior, all |
HN_rlmc1, EXP_rlmc1, HC_rlmc1, LMX_rlmc1 |
dynamically adjusted with target RLMC= |
HN_U2tail, EXP_U2tail5, HC_U2tail5, LMX_U2tail |
|
HN_rlmc2, EXP_rlmc2, HC_rlmc2, LMX_rlmc2 |
dynamically adjusted with target RLMC= |
This function takes ca. 5-10 minutes to run on the acute graft rejection data set given in the example below.
For effects which are not on the log-odds (ratio) scale, the prior for the effect needs to be adjusted, but otherwise the same code can be used if a Bayesian normal-normal hierarchical model is appropriate.
Ott, M., Hunanyan, S., Held, L., Roos, M. Sensitivity quantification in Bayesian meta-analysis. Manuscript revised for Research Synthesis Methods. 2020.
Roever C. Bayesian random-effects meta-analysis using the bayesmeta R package. Journal of Statistical Software (accepted), 2018.
Roos, M., Martins, T., Held, L., Rue, H. (2015). Sensitivity analysis for Bayesian hierarchical models. Bayesian Analysis 10(2), 321–349. https://projecteuclid.org/euclid.ba/1422884977
bayesmeta
in package bayesmeta,
pri_par_adjust_static
,
pri_par_adjust_dynamic
,
effective_rlmc
,
pri_par_epsilon_grid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Acute Graft rejection (AGR) data analyzed in Friede et al. (2017),
# Sect. 3.2, URL: https://doi.org/10.1002/bimj.201500236
# First study: experimental group: 14 cases out of 61;
# control group: 15 cases out of 20
# Second study: experimental group: 4 cases out of 36;
# control group: 11 cases out of 36
rT <- c(14,4)
nT <- c(61,36)
rC <- c(15,11)
nC <- c(20,36)
df <- data.frame(y = log((rT*(nC-rC))/(rC*(nT-rT))), # log-OR
sigma = sqrt(1/rT+1/(nT-rT)+1/rC+1/(nC-rC)), # SE(log-OR)
labels = c(1:2))
# compute the table for the AGR data with RLMC target values 0.4 and 0.7
# and a weighted harmonic mean to compute the reference sd
# warning: it takes ca. 5-10 minutes to run this function
# on the above data set!
sensitivity_learning_table_flexible(df, rlmc1=0.4, rlmc2=0.7,
type_sigma_ref="harmonic")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.