diff --git a/man/toInteger.Rd b/man/toInteger.Rd index 3ac2bfe6..425b4719 100644 --- a/man/toInteger.Rd +++ b/man/toInteger.Rd @@ -54,30 +54,24 @@ For 3:2 randomization, \code{ratio = 4} would ensure rounding sample size to a multiple of 5. For a \code{gsSurv} object, \code{x$n.I} is an event-count schedule. -\code{toInteger()} first converts each planned event count to an integer. -Interim event counts are rounded to the nearest integer. The final event -count is rounded up when \code{roundUpFinal = TRUE}; otherwise, it is rounded -to the nearest integer. Values within 0.01 of an integer are rounded to that -integer. Counts are constrained to be positive and strictly increasing. The -group sequential boundaries and spending are then recomputed with -\code{gsDesign()} at the integer event counts. +\code{toInteger()} rounds the final planned event count (up when +\code{roundUpFinal = TRUE}; otherwise to nearest integer, with a 0.01 +tolerance), then derives interim integer event targets from +\code{x$timing * final_events}. Interim counts are constrained to be positive +and strictly increasing. Group sequential boundaries and spending are +recomputed with \code{gsDesign()} at the integer event counts. -Total sample size for a survival design is handled separately. The final -expected total enrollment is rounded to a multiple of \code{ratio + 1}, -rounded up when \code{roundUpFinal = TRUE} and rounded to the nearest such -multiple otherwise. Enrollment rates are scaled to achieve that rounded total -over the original calendar plan, and final and interim analysis times are -recalculated to match the integer event targets. +Total sample size for a survival design is then updated under a fixed +calendar plan (same enrollment periods, study duration, and minimum +follow-up). Enrollment rates are scaled proportionally to the final-event +inflation factor and rounded to the nearest allocation multiple +\code{ratio + 1} (or rounded up when \code{roundUpFinal = TRUE}), with +additional allocation-step adjustment only if needed to make the integer +final event target achievable. -In seasonal or otherwise piecewise survival designs, the independently -rounded final sample size from this usual rule can make the final integer event target -unattainable. If the rounded sample size is too small to ever reach the event -target, \code{toInteger()} increases the sample size by allocation multiples. -If the rounded sample size already implies more expected events than a lower -event target at the earliest feasible final analysis, \code{toInteger()} -reduces the sample size by allocation multiples. Either adjustment issues a -warning. Designs where the initially rounded sample size already supports the -integer event target retain the previous behavior. +If fixed-calendar enrollment-rate inflation cannot make the integer final +event target feasible, \code{toInteger()} falls back to a variable-duration +solve and issues a warning. For a complete seasonal exact-binomial monitoring workflow, see \code{vignette("MultiSeasonRareEvents", package = "gsDesign")}.