Description Usage Arguments Value Examples
SimRej returns rejection decision of null treatment effect
1 2 3 4 5 6 7 8 9 10 11  | SimRej(family, to.do.option, cSet, cNarmVar = "narm",
  cNcluster.armVar = "ncluster.arm", cNpat.clusterVar = "npat.cluster",
  cTrtVecVar, cBtwVar = "sigma.b", cWthVar = "sigma.e", hSet = NULL,
  hNarmVar = "narm", hNpat.armVar = "npat.arm", hTrtVecVar = NULL,
  hWthVar = "sigma.e", hData = NULL, hTrtVar = "x", hOutcomeVar = "y",
  hSumVar = "n", cRdmSeed = 1, hRdmSeed = 1, weight = "asym",
  cover.level = 0.95, nchain = 1, niter = 2000, nburnin = 1000,
  nthin = 1, file.dir = tempdir(), cfile.name = "cmodelfile",
  hfile.name = "hmodelfile", pprfile.name = "pprmodelfile",
  graphics.name = "graphics", file.rm = F, OpenBUGS.dir = NULL,
  OpenBUGS.seed = 1)
 | 
family | 
 outcome distribution  | 
to.do.option | 
 a value in 'sim_power', 'sim_SSD' and 'real_SSD'  | 
cSet | 
 current trial setting. It should be in a list.  | 
cNarmVar | 
 the variable name of arm in current trial.  | 
cNcluster.armVar | 
 the variable name of total clusters in each arm in current trial. Its default value is 'ncluster.arm'.  | 
cNpat.clusterVar | 
 the variable name of total patients in each cluster in current trial. Its default value is 'npat.cluster'.  | 
cTrtVecVar | 
 the variable name of treatment in current trial. It should be in the order of first treatment, second treatment until the last one.  | 
cBtwVar | 
 the variable name of between cluster variation in current trial.  | 
cWthVar | 
 the variable name of within cluster variation in current trial.  | 
hSet | 
 historical trial setting. It should be in a list. It is NULL by default.  | 
hNarmVar | 
 the variable name of arm in historical trial.  | 
hNpat.armVar | 
 the variable name of total patients in each arm in historical trial. Its default value is 'npat.arm'.  | 
hTrtVecVar | 
 the variable name of treatment in historical trial. It should be in the order of first treatment, second treatment until the last one.  | 
hWthVar | 
 the variable name of within cluster variation in historical trial.  | 
hData | 
 Real historical trial data. It is NULL by default.  | 
hTrtVar | 
 the variable name of treatment in historical trial data.  | 
hOutcomeVar | 
 the variable name of outcome in historical trial data.  | 
hSumVar | 
 the variable name of total observation in historical trial data.  | 
cRdmSeed | 
 the random seed to generate current trial data.  | 
hRdmSeed | 
 the random seed to generate historical trial data.  | 
weight | 
 discounting parameter. It is 'asym' by default.  | 
cover.level | 
 nomial coverage level of HPD interval.  | 
nchain | 
 number of mcmc chains to run.  | 
niter | 
 length of mcmc chains.  | 
nburnin | 
 length of burnin of mcmc chains.  | 
nthin | 
 thinning rate of mcmc chain.  | 
file.dir | 
 directory to save the model BUGS file and input and output files of OpenBUGS.  | 
cfile.name | 
 the file name of current BUGS model.  | 
hfile.name | 
 the file name of historical BUGS model.  | 
pprfile.name | 
 the file name of power prior BUGS model.  | 
graphics.name | 
 the file name of mcmc convergence graphics.  | 
file.rm | 
 whether to remove all files after Bayesian computations are done.  | 
OpenBUGS.dir | 
 directory to install OpenBUGS package.  | 
OpenBUGS.seed | 
 the random number generator state of OpenBUGS.  | 
rejection decision of null treatment effect
1 2 3 4 5 6 7 8 9 10 11 12  | ## Not run: 
my.curset <- list(narm=3,ncluster.arm=rep(5,3),npat.cluster=rep(20,15),
'trt1'=0.1,'trt2 v.s. trt1'=1,'trt3 v.s. trt1'=1,sigma.b=1)
my.histset <- list(narm=3,npat.arm=rep(20,3),
'trt1'=-0.1,'trt2 v.s. trt1'=1,'trt3 v.s. trt1'=1)
myrej <- SimRej(family='binomial', to.do.option="sim_power",cSet=my.curset,
cTrtVecVar=c('trt1', paste(paste('trt', 2:3, sep=""),'v.s.', 'trt1',sep=" ")),
hSet=my.histset,
hTrtVecVar=c('trt1', paste(paste('trt', 2:3, sep=""),'v.s.', 'trt1',sep=" ")),
file.rm=T, nchain=2,niter=200,nburnin=50,nthin=5, OpenBUGS.seed=4)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.