commensurate.bin {psBayesborrow}R Documentation

Bayesian analysis with commensurate prior for binary outcome

Description

Bayesian analysis for binary outcome is implemented via MCMC, where a commensurate prior is used for incorporating data from external controls. No borrowing and full borrowing are also applicable.

Usage

commensurate.bin(
  formula, data, method.borrow,
  chains=2, iter=4000, warmup=floor(iter/2), thin=1,
  alternative="greater", sig.level=0.025,
  seed=sample.int(.Machine$integer.max,1))

Arguments

formula

Object of class formula, which is a symbolic description of the model to be fitted. The explanatory variables only include covariates of interest, which must be specified in the form of linear combination.

data

Data frame, which must have variables named study for study indicator (0 for external control, and 1 for current trial) and treat for treatment indicator (0 for concurrent and external control, and 1 for treatment).

method.borrow

List of information borrowing method. "noborrow" uses the concurrent data only. "fullborrow" uses the external control data without discounting. "cauchy" uses the commensurate prior to dynamically borrow the external control data, and the commensurability parameter is assumed to follow a half-Cauchy distribution. "normal" uses the commensurate prior to dynamically borrow the external control data, and the commensurability parameter is assumed to follow a half-normal distribution. "cauchy" and "normal" require to specify the scale parameter scale of half-Cauchy and half-normal distribution respectively.

chains

Number of Markov chains in MCMC sampling. The default value is chains=2.

iter

Number of iterations for each chain (including warmup) in MCMC sampling. The default value is iter=4000.

warmup

Number of warmup (aka burnin) iterations per chain in MCMC sampling. The default value is warmup=floor(iter/2).

thin

Period for saving samples in MCMC sampling. The default value is thin=1.

alternative

Alternative hypothesis to be tested ("greater" or "less"). The default value is alternative="greater".

sig.level

Significance level. The default value is sig.level=0.025.

seed

Setting a seed for MCMC sampling.

Details

The binary outcome is assumed to follow a binomial distribution. Given more than one covariates, a logistic regression model is built and its Bayesian estimation is performed via MCMC. Commensurate prior is used to dynamically discount the information to be borrowed from external control based on the similarity between the current trial and external controls, where the commensurability parameter determines the extent of borrowing. The commensurability parameter is assumed to follow a half-cauchy or a half-normal distribution, and its scale parameter needs to be carefully specified. No borrowing approach is to perform the analysis without incorporating the external controls. Full borrowing approach is just to pool the concurrent and external controls, which is used as a comparator in the analysis.

Value

The commensurate.cont returns a list containing the following objects:

reject

Data frame containing results of Bayesian one-sided hypothesis testing (whether or not the posterior probability that the log odds ratio is greater or less than 0 exceeds 1 minus significance level): TRUE when significant, otherwise FALSE.

theta

Data frame containing posterior mean, median, and sd of log odds ratio.

stan.obj

Stanfit object.

References

Hobbs BP, Carlin BP, Mandrekar SJ, Sargent DJ. Hierarchical commensurate and power prior models for adaptive incorporation of historical information in clinical trials. Biometrics 2011; 67:1047-1056.

Hobbs BP, Sargent DJ, Carlin BP. Commensurate priors for incorporating historical information in clinical trials using general and generalized linear models. Bayesian Analysis 2012; 7:639-674.

Examples

n.CT  <- 100
n.CC  <- 50
n.ECp <- 200

out.prob.CT <- 0.2
out.prob.CC <- 0.2
driftOR     <- 1.0

cov.C <- list(list(dist="norm",mean=0,sd=1,lab="cov1"),
              list(dist="binom",prob=0.4,lab="cov2"))

cov.cor.C <- rbind(c(  1,0.1),
                   c(0.1,  1))

cov.EC <- list(list(dist="norm",mean=0,sd=1,lab="cov1"),
               list(dist="binom",prob=0.4,lab="cov2"))

cov.cor.EC <- rbind(c(  1,0.1),
                    c(0.1,  1))

cov.effect <- c(0.9,0.9)

indata <- trial.simulation.bin(
  n.CT=n.CT, n.CC=n.CC, n.ECp=n.ECp,
  out.prob.CT=out.prob.CT, out.prob.CC=out.prob.CC, driftOR=driftOR,
  cov.C=cov.C, cov.cor.C=cov.cor.C,
  cov.EC=cov.EC, cov.cor.EC=cov.cor.EC, cov.effect=cov.effect)

n.EC <- 50

method.whomatch <- "conc.treat"
method.matching <- "optimal"
method.psorder  <- NULL

out.psmatch <- psmatch(
  study~cov1+cov2, data=indata, n.EC=n.EC,
  method.whomatch=method.whomatch, method.matching=method.matching,
  method.psorder=method.psorder)

indata.match <- rbind(indata[indata$study==1,],indata[out.psmatch$subjid.EC,])

method.borrow <- list(list(prior="cauchy",scale=2.0),
                      list(prior="normal",scale=0.5))

commensurate.bin(y~cov1,data=indata.match,method.borrow=method.borrow,chains=1,iter=100)

[Package psBayesborrow version 1.1.0 Index]