This function performs analysis of binary data using the Meta-Analytic-Predictive (MAP) Prior approach. The method borrows data from non-concurrent controls to obtain the prior distribution for the control response in the concurrent periods.
MAPprior_bin(
data,
arm,
alpha = 0.025,
opt = 2,
prior_prec_tau = 4,
prior_prec_eta = 0.001,
n_samples = 1000,
n_chains = 4,
n_iter = 4000,
n_adapt = 1000,
robustify = TRUE,
weight = 0.1,
check = TRUE,
...
)List containing the following elements regarding the results of comparing arm to control:
p-val - posterior probability that the log-odds ratio is less than zero
treat_effect - posterior mean of log-odds ratio
lower_ci - lower limit of the (1-2*alpha)*100% credible interval for log-odds ratio
upper_ci - upper limit of the (1-2*alpha)*100% credible interval for log-odds ratio
reject_h0 - indicator of whether the null hypothesis was rejected or not (p_val < alpha)
Data frame with trial data, e.g. result from the datasim_bin() function. Must contain columns named 'treatment', 'response' and 'period'.
Integer. Index of the treatment arm under study to perform inference on (vector of length 1). This arm is compared to the control group.
Double. Decision boundary (one-sided). Default=0.025
Integer (1 or 2). If opt==1, all former periods are used as one source; if opt==2, periods get separately included into the final analysis. Default=2.
Double. Precision parameter (\(1/\sigma^2_{\tau}\)) of the half normal hyperprior, the prior for the between study heterogeneity. Default=4.
Double. Precision parameter (\(1/\sigma^2_{\eta}\)) of the normal hyperprior, the prior for the hyperparameter mean of the control log-odds. Default=0.001.
Integer. Number of how many random samples will get drawn for the calculation of the posterior mean, the p-value and the CI's. Default=1000.
Integer. Number of parallel chains for the rjags model. Default=4.
Integer. Number of iterations to monitor of the jags.model. Needed for coda.samples. Default=4000.
Integer. Number of iterations for adaptation, an initial sampling phase during which the samplers adapt their behavior to maximize their efficiency. Needed for jags.model. Default=1000.
Logical. Indicates whether a robust prior is to be used. If TRUE, a mixture prior is considered combining a MAP prior and a weakly non-informative component prior. Default=TRUE.
Double. Weight given to the non-informative component (0 < weight < 1) for the robustification of the MAP prior according to Schmidli (2014). Default=0.1.
Logical. Indicates whether the input parameters should be checked by the function. Default=TRUE, unless the function is called by a simulation function, where the default is FALSE.
Further arguments passed by wrapper functions when running simulations.
Katharina Hees
The MAP approach derives the prior distribution for the control response in the concurrent periods by combining the control information from the non-concurrent periods with a non-informative prior.
The model for the binary response \(y_{js}\) for the control patient \(j\) in the non-concurrent period \(s\) is defined as follows:
$$g(E(y_{js})) = \eta_s$$
where \(g(\cdot)\) denotes the logit link function and \(\eta_s\) represents the control log odds in the non-concurrent period \(s\).
The log odds for the non-concurrent controls in period \(s\) are assumed to have a normal prior distribution with mean \(\mu_{\eta}\) and variance \(\tau^2\):
$$\eta_s \sim \mathcal{N}(\mu_{\eta}, \tau^2)$$
For the hyperparameters \(\mu_{\eta}\) and \(\tau\), normal and half-normal hyperprior distributions are assumed, with mean 0 and variances \(\sigma^2_{\eta}\) and \(\sigma^2_{\tau}\), respectively:
$$\mu_{\eta} \sim \mathcal{N}(0, \sigma^2_{\eta})$$
$$\tau \sim HalfNormal(0, \sigma^2_{\tau})$$
The MAP prior distribution \(p_{MAP}(\eta_{CC})\) for the control response in the concurrent periods is then obtained as the posterior distribution of the parameters \(\eta_s\) from the above specified model.
If robustify=TRUE, the MAP prior is robustified by adding a weakly-informative mixture component \(p_{\mathrm{non-inf}}\), leading to a robustified MAP prior distribution:
$$p_{rMAP}(\eta_{CC}) = (1-w) \cdot p_{MAP}(\eta_{CC}) + w \cdot p_{\mathrm{non-inf}}(\eta_{CC})$$
where \(w\) (parameter weight) may be interpreted as the degree of skepticism towards borrowing strength.
In this function, the argument alpha corresponds to \(1-\gamma\), where \(\gamma\) is the decision boundary. Specifically, the posterior probability of the difference distribution under the null hypothesis is such that:
\(P(p_{treatment}-p_{control}>0) \ge 1-\)alpha.
In case of a non-informative prior this coincides with the frequentist type I error.
Robust meta-analytic-predictive priors in clinical trials with historical control information. Schmidli, H., et al. Biometrics 70.4 (2014): 1023-1032.
Applying Meta-Analytic-Predictive Priors with the R Bayesian Evidence Synthesis Tools. Weber, S., et al. Journal of Statistical Software 100.19 (2021): 1548-7660.
trial_data <- datasim_bin(num_arms = 3, n_arm = 100, d = c(0, 100, 250),
p0 = 0.7, OR = rep(1.8, 3), lambda = rep(0.15, 4), trend="stepwise")
MAPprior_bin(data = trial_data, arm = 3)
Run the code above in your browser using DataLab