TwoSample.Boundary.TTFE: Function to calculate the sequential rejection boundaries for...

View source: R/TwoSample.Boundary.TTFE.R

TwoSample.Boundary.TTFER Documentation

Function to calculate the sequential rejection boundaries for the time-to-first-event (TTFE) method.

Description

Constructs two-sided group sequential critical boundaries for the two-sample TTFE log-rank Z-statistics at prespecified calendar times. The function converts stage-wise variance estimates into information fractions, allocates incremental Type I error using a spending function, and solves for the corresponding multivariate normal critical values under the canonical joint distribution assumption. It also returns stage-wise rejection indicators (with early stopping enforced).

Usage

TwoSample.Boundary.TTFE(result, spend, calendars, alpha, planned.n, Iunit)

Arguments

result

A list returned by TwoSample.Z.Var.Estimator.Sequential.TTFE().

spend

A Type I error spending function. This should be a function of a single argument t (information fraction) returning cumulative alpha spent by information fraction t (e.g., OBF).

calendars

Numeric vector of interim analysis calendar times (in years).

alpha

Overall two-sided Type I error rate. Default typically 0.05.

planned.n

Planned total sample size used to define the information scale.

Iunit

Information per subject at the final analysis.

Value

A list containing:

  • Z.stats: Stage-wise TTFE Z-statistics.

  • vars: Stage-wise variance estimates.

  • raw.information: Stage-wise information fractions.

  • TTFE.bdry: Two-sided critical boundaries at each analysis stage.

  • TTFE.reject: Stage-wise rejection indicators (1 = reject at that stage, 0 otherwise), with later stages set to 0 after the first rejection.

  • nu: Stage-wise information fractions after handling edge cases (e.g., reaching 100% information early).

  • pi: Incremental Type I error allocated to each stage.

  • total.ns: Total sample size contributing at each analysis stage (copied from result).


gsMeanFreq documentation built on Feb. 17, 2026, 1:07 a.m.