Open fpahlke opened 2 weeks ago
I agree, the number of patients in a sub-population is typically a random variable. However, we have investigated this: for the simulations there is no relevant effect on the test characteristics when using fixed sample sizes as compared to a random sample size. That's the reason why we decided to take it non-random.
The bug will be fixed
Enhancement Suggestion
I have noticed that the sample size of the subpopulation is fixed in the
.data
dataset embedded within the object returned bygetSimulationEnrichmentMeans
(i.e., SS at IA * prevalence) and is not random. This allowed me to calculate the conditional power in the subpopulation, so my issue is resolved.However, based on my experience, this data generation approach does not reflect reality in most cases. The number of patients in the subpopulation at the interim analysis (IA) is typically a random variable and not known beforehand. I believe that the variability in subpopulation sample size at IA can significantly impact the operating characteristics of an enrichment design and should be considered.
To account for this, it would be necessary to generate the subpopulation sample size randomly and provide the realized sample sizes to the
selectPopulationsFunction
andcalcSubjectsFunction
. Perhaps this could be an idea for a future enhancement.Bug Report
In the
.data
dataset contained in the result ofgetSimulationEnrichmentMeans
, the variablesnumberOfSubjects
andnumberOfCumulatedSubjects
are not represented correctly. Both variables sum the sample size of the subpopulation with the sample size of the full population. However, since the subpopulation is already part of the full population, this results in double-counting the subpopulation.The correct sample sizes are only available in the
subjectsPopulation
variable.