Helper function for example that creates a test data set in the proper format
createTestData(times = c(0:11), transition = 5, rx1 = 0.5, rx2 = 1, slope = 0.5,
error=0.3, n = c(50, 50, 50))Observation times
Time where phase I ends and Phase II begins
Drug effect on slope of outcome during phase 1.
Drug effect on slope of outcome during phase 2.
Slope of outcome.
Standard Deviation of the error.
Sample sizes of the three groups, Placebo-Placebo, Placebo-Drug, Drug
A dataframe is returned with variables:
Patient ID
Integer 1,2,3 indicating whether the patient is in the placebo-placebo, placebo-drug or drug groups
Time that phase 1 ends and phase 2 starts
The observation time
The value of the outcome variable
The model used is
that the outcome is equal to (slope) times times for patients in the Placebo cohort with the addition of rx1 for the Drug cohort, during the first phase, and is equal to (slope+rx2) times (times-transition) for the Drug group in the second phase, and slope for the Placebo group in the second phase. A random noise is added to each observation with standard deviation error
Fava, M., Evins, A. E., Dorer, D. J., and Schoenfeld, D. A. (2003). The problem of the placebo response in clinical trials for psychiatric disorders: culprits, possible remedies, and a novel study design approach. Psychotherapy and Psychosomatics, 72,3, 115--127.
Chen, Y. F., Yang, Y., Hung, H. J., & Wang, S. J. (2011). Evaluation of performance of some enrichment designs dealing with high placebo response in psychiatric clinical trials. Contemporary clinical trials, 32,4, 592-604.
# NOT RUN {
createTestData(times=0:3,n=c(3,3,3),transition=5,rx1=0,rx2=0)
# }
Run the code above in your browser using DataLab