Description Usage Arguments Value
Create an initial study object that represents the study state before it is executed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | createStudy(nCohorts = 3, cohortStartTimes = c(2, 1, 0),
samplingDesign = list(c(0, 1, 2, 3, 4, 5, 6) * 30, c(0/30, 3, 6) * 30,
c(0/30, 3, 6) * 30), nSubjects = c(320, 320, 320), dropoutRates = c(0.2/(6
* 30), 0.2/(6 * 30), 0.2/(6 * 30)),
randomizationProbabilities = list(c(0.25, 0.25, 0.25, 0.25), c(0.25, 0.25,
0.25, 0.25), c(0.25, 0.25, 0.25, 0.25)),
minAllocationProbabilities = list(c(0.25, 0, 0, 0), c(0.25, 0, 0, 0),
c(0.25, 0, 0, 0)), treatments = list(c("SoC-1", "TRT-1", "TRT-2", "TRT-3"),
c("SoC-2", "TRT-4", "TRT-5", "TRT-6"), c("SoC-3", "TRT-7", "TRT-8", "TRT-9")),
effSizes = list(c(0, 0.05, 0.1, 0.25), c(0, 0, 0.05, 0.25), c(0, 0.05, 0.25,
0.3)), newCohortLink = list(2, 3, NULL), recruitmentAges = list(c(0, 1) *
30, c(6, 7) * 30, c(12, 13) * 30),
Recruitmentfunction = RecruitmentRatefunction,
Futilityfunction = futilityFunction, debugLevel = 1, studyStopTime = 30
* 28, latestTimeForNewBirthCohorts = 0, strCovariates = c("BIRTHWT",
"MAGE", "MHTCM", "SEXN", "SANITATN"), currentDate = Sys.Date(),
minFutilityProb = 0.1, checkFutility = c("before", "after"),
impMethod = c("pmm", "median"), accumulatedData = FALSE,
InitEventFunction = InitEvent,
StudyIncrementEventFunction = StudyIncrementEvent,
StopEventFunction = StopEvent, AddCohortEventFunction = AddCohortEvent,
DropoutEventFunction = DropoutEvent,
RecruitmentEventFunction = RecruitmentEvent,
SimulateDataEventFunction = SimulateDataEvent,
MoveCompletedSubjectsFunction = MoveCompletedSubjects,
AnalyzeDataEventFunction = AnalyzeDataEvent,
UpdateProbabilitiesEventFunction = UpdateProbabilitiesEvent,
updateProbabilitiesFunction = UpdateProbabilities,
AddNewBirthCohortEventFunction = AddNewBirthCohortEvent,
probTemperationFunction = probTemperation,
interimAnalyzesTimeFunction = InterimAnalyzesTime)
|
nCohorts |
The number of cohorts. |
cohortStartTimes |
A vector of start times for the different cohorts, in days of study time. |
samplingDesign |
A list of vector with sampling times for each cohort. |
nSubjects |
A vector of number of subjects in each cohort. |
dropoutRates |
A vector of dropout rates (per day) for each of the cohorts. |
randomizationProbabilities |
Initial randomization probabilities. |
minAllocationProbabilities |
Minium allocation for each treatment, default 0.25 allocation for SoC and 0 for the other treatments. |
treatments |
A list of treatments for each cohort. |
effSizes |
A list of effect sizes for each treatment in each cohort, default effect size per 6 month. |
newCohortLink |
A vector of dependencies between cohorts when evolving in age, default Cohort 1 will evolve similar to cohort 2, Cohort 2 will evolve similar to cohort 3, Cohort 3 will not evlove. |
recruitmentAges |
A list of age ranges in which subjects are recruited to each cohort. Each list component should be a vector with the min and max age. |
debugLevel |
The debug level. 4=Extreme output, #3=Print everything important, 2=Print events, 1=Sparse print, 0=Print nothing. |
studyStopTime |
The number of days the study will continue. |
latestTimeForNewBirthCohorts |
The latest time for new birth cohorts to start (in days), default 0 = No new birth cohorts. |
strCovariates |
A vector with the names of the covariates that should be used in the interim analysis. |
currentDate |
The study start date, default = current system date. |
minFutilityProb |
The probability below which a treatment is regarded as futile. |
checkFutility |
If futility should be checked before or after taking minimum allocation into account. Default is 'before. Possible values are 'before' and 'after'. |
impMethod |
Imputation method for missing covariates in the interim analyses. |
accumulatedData |
Should accumulated data be used for probability updates? Logical. Default is FALSE. |
StudyIncrementEventFunction |
Study increment event function |
StopEventFunction |
Stop event function |
AddCohortEventFunction |
= Add cohort event function |
DropoutEventFunction |
= Dropout event function |
RecruitmentEventFunction |
= Recruitment event function |
SimulateDataEventFunction |
= Simulate data event function |
MoveCompletedSubjectsFunction |
= Move completed subjects function |
AnalyzeDataEventFunction |
= Analyze data event function |
UpdateProbabilitiesEventFunction |
= UpdateProbabilitiesEvent, |
AddNewBirthCohortEventFunction |
Add new birth cohort event function |
probTemperationFunction |
Fucntion for modifying probabilities, e.g. to be less dramatic. The default is to have no probability temperation. |
RecruitmentFunction |
A function defining the recruitment rate per time unit (default day). |
InitEvent |
Init event funciton |
A FAIRsimulator study
object ready to be executed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.