bacisOneTrial {bacistool} | R Documentation |
Running one trial computation based on the BaCIS model.
Description
The bacisOneTrial function takes data and parameter values as input. It conducts a trial computation based on the BaCIS model. It calls the JAGS for the Bayesian MCMC sampling for the subgroup classification and hierarchical model information borrowing. It illustrates plots of the classficaiton results and the posterior response distributions of subgroups, and returns the inference results.
Usage
bacisOneTrial(numGroup, tau1, tau2, phi1, phi2, tau4, alpha, beta,
clusterCutoff, finalCutoff, MCNum, nDat,xDat, cols,
clusterCols, yLim, seed)
Arguments
numGroup |
Number of subgroups in the trial. |
tau1 |
The precision parameter of subgroups clustering for the classification model. |
tau2 |
The precision prior for the latent variable for the classification. |
phi1 |
Center for the low response rate cluster. |
phi2 |
Center for the high response rate cluster. |
tau4 |
The precision prior for the center of the cluster in the information borrowing model. |
alpha |
Hyperprior parameters alpha to control the magnitude of information borrowing model. |
beta |
Hyperprior parameters beta to control the magnitude of the information borrowing model. |
clusterCutoff |
The cutoff value of the cluster classification. If its value is NA, adaptive classification is applied. |
finalCutoff |
The posterior cutoff value of the final inference for each subgroup. |
MCNum |
The number of MCMC sampling iterations. |
nDat |
The vector of total sample sizes of all subgroups. |
xDat |
The vector of the response numbers of all subgroups. |
cols |
The color vector of all subgroups in the illustration. |
clusterCols |
The color vector of all clusters in the illustration. |
yLim |
The maximum Y-axis value in the illustration. |
seed |
Random seed value. If its value is NA, a time dependent random seed is generated and applied. |
Value
The trial simulation illustrates the plot of posterior distribution of classificaiton, posterior response rates of all subgroups, and the posterior response distributions of two clusters.
It also return a matrix including the following information of all subgroups:
Prob(p_i>phi_1) |
Posterior probability of response probability being greater than phi_1. |
Prob(p_i>phi_2) |
Posterior probability of response probability being greater than phi_2. |
theta>0 |
Posterior probability of latent variable being greater than 0. |
Classified to high response cluster |
0: Classified into the lower response cluster, 1: classified into the high response cluster. |
The treatment is effective |
0: The subgroup is not effective, 1: the subgroup is effective. |
Posterior Resp. |
Posterior response rates of subgroups. |
Observed Resp. |
Observe response rates of subgroups. |
Number of response |
Number of responses of subgroups. |
Total sample size |
Total sample sizes of subgroups. |
Effective sample size |
Effective sample sizes of subgroups. |
Author(s)
Nan Chen and J. Jack Lee / Department of Biostatistics UT MD Anderson Cancer Center
Examples
## Not run:
## An example for running a simulation trial using the BaCIS method
library(bacistool)
bacisOneTrial(
numGroup=5,
tau1=NA,
tau2=.001,
phi1=0.1, phi2=0.3,
tau4=0.1,
alpha=50,
beta=2,
clusterCutoff = NA,
finalCutoff = 0.92,
MCNum=50000,
nDat=c(25,25,25,25,25),
xDat=c(2,3,7,6,10),
cols=c("brown","red","orange","blue","green"),
clusterCols=c(6,4),
yLim=22,
seed=100
)
## End(Not run)