MAPprior_cont {NCC}R Documentation

Analysis for continuous data using the MAP Prior approach

Description

This function performs analysis of continuous 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.

Usage

MAPprior_cont(
  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,
  ...
)

Arguments

data

Data frame with trial data, e.g. result from the datasim_bin() function. Must contain columns named 'treatment', 'response' and 'period'.

arm

Integer. Index of the treatment arm under study to perform inference on (vector of length 1). This arm is compared to the control group.

alpha

Double. Decision boundary (one-sided). Default=0.025

opt

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.

prior_prec_tau

Double. Precision parameter (1/στ21/\sigma^2_{\tau}) of the half normal hyperprior, the prior for the between study heterogeneity. Default=4.

prior_prec_eta

Double. Precision parameter (1/ση21/\sigma^2_{\eta}) of the normal hyperprior, the prior for the hyperparameter mean of the control mean. Default=0.001.

n_samples

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.

n_chains

Integer. Number of parallel chains for the rjags model. Default=4.

n_iter

Integer. Number of iterations to monitor of the jags.model. Needed for coda.samples. Default=4000.

n_adapt

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.

robustify

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.

weight

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.

check

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.

Details

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 continuous response yjsy_{js} for the control patient jj in the non-concurrent period ss is defined as follows:

E(yjs)=ηsE(y_{js}) = \eta_s

where ηs\eta_s represents the control mean in the non-concurrent period ss.

The means for the non-concurrent controls in period ss are assumed to have a normal prior distribution with mean μη\mu_{\eta} and variance τ2\tau^2:

ηsN(μη,τ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 ση2\sigma^2_{\eta} and στ2\sigma^2_{\tau}, respectively:

μηN(0,ση2)\mu_{\eta} \sim \mathcal{N}(0, \sigma^2_{\eta})

τHalfNormal(0,στ2)\tau \sim HalfNormal(0, \sigma^2_{\tau})

The MAP prior distribution pMAP(ηCC)p_{MAP}(\eta_{CC}) for the control response in the concurrent periods is then obtained as the posterior distribution of the parameters ηs\eta_s from the above specified model.

If robustify=TRUE, the MAP prior is robustified by adding a weakly-informative mixture component pnoninfp_{\mathrm{non-inf}}, leading to a robustified MAP prior distribution:

prMAP(ηCC)=(1w)pMAP(ηCC)+wpnoninf(ηCC)p_{rMAP}(\eta_{CC}) = (1-w) \cdot p_{MAP}(\eta_{CC}) + w \cdot p_{\mathrm{non-inf}}(\eta_{CC})

where ww (parameter weight) may be interpreted as the degree of skepticism towards borrowing strength.

In this function, the argument alpha corresponds to 1γ1-\gamma, where γ\gamma is the decision boundary. Specifically, the posterior probability of the difference distribution under the null hypothesis is such that: P(μtreatmentμcontrol>0)1P(\mu_{treatment}-\mu_{control}>0) \ge 1-alpha. In case of a non-informative prior this coincides with the frequentist type I error.

Value

List containing the following elements regarding the results of comparing arm to control:

Author(s)

Katharina Hees

References

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.

Examples


trial_data <- datasim_cont(num_arms = 3, n_arm = 100, d = c(0, 100, 250),
theta = rep(0.25, 3), lambda = rep(0.15, 4), sigma = 1, trend = "stepwise")

MAPprior_cont(data = trial_data, arm = 3)



[Package NCC version 1.0 Index]