Description Usage Arguments Value Examples
Simulate multiple instances of a study, optionally in a parallel fashion.
1 2 3 | runMultiSim(StudyOnjIni, extractProbs = TRUE, iter = 1, ncores = 1,
strProb = "UnWeightedRandomizationProbabilities", cohortAgeNames = NULL,
clean = TRUE)
|
StudyOnjIni |
An initial FAIRsimulator |
extractProbs |
Whether to also extract randomization probabilities (in parallel). |
iter |
The number of studies to simulate. |
ncores |
The number of cores to use for parallel execution. |
... |
Other parameters. Typically |
A list with a list if the simulated FAIRsimulator study
objects and, optionally, a data.frame with the randomizaion probabilities.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
StudyObjIni <- createStudy(latestTimeForNewBirthCohorts=18*30,studyStopTime = 32*30,
nSubjects = c(320,320,320),
randomizationProbabilities = list(rep(0.20,5),rep(0.20,5),rep(0.20,5)),
#minAllocationProbabilities = list(c(0,rep(0,4)),c(0,rep(0,4)),c(0,rep(0,4))),
minAllocationProbabilities = list(c(0.2,rep(0,4)),c(0.2,rep(0,4)),c(0.2,rep(0,4))),
treatments =list(c("SoC-1","TRT-1","TRT-2","TRT-3","TRT-4"),c("SoC-2","TRT-5","TRT-6","TRT-7","TRT-8"),c("SoC-3","TRT-9","TRT-10","TRT-11","TRT-12")),
effSizes = list(c(0,0.05,0.1,0.15,0.25),c(0,0.05,0.1,0.15,0.25),c(0,0.05,0.1,0.15,0.25)),
Recruitmentfunction=function(...) {return(5000)},
minSubjects = 10)
myMultStud <- runMultiSim(StudyOnjIni,iter=10,ncores=2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.