TwoSample.Wald.and.Boundary: Function to calculate the Wald statistics and group...

View source: R/TwoSample.Wald.and.Boundary.R

TwoSample.Wald.and.BoundaryR Documentation

Function to calculate the Wald statistics and group sequential boundaries for two-sample monitoring.

Description

Computes stage-wise Wald statistics from estimated two-sample statistics and their variances, determines information fractions, allocates Type I error using a user specified spending function, and constructs corresponding two-sided rejection boundaries. The function supports both a consistent correlation approach (supplied in Q.cov.est) and a canonical correlation approach based on information fractions.

Usage

TwoSample.Wald.and.Boundary(
  Q.cov.est,
  spend,
  calendars,
  alpha,
  planned.n,
  Iunit
)

Arguments

Q.cov.est

A list containing stage-wise estimates and covariances, either returned by TwoSample.Estimator.LR.sequential() or TwoSample.Estimator.GT.sequential().

spend

A function specifying the cumulative Type I error spending function \alpha(t) evaluated at information fraction t. For example, OBF.

calendars

Numeric vector of analysis calendar times (in years), defining the planned monitoring schedule and number of analysis.

alpha

Overall two-sided Type I error.

planned.n

Planned total sample size at the final analysis.

Iunit

Information per subject (or per unit of sample size) used to scale the information fractions.

Value

A list with components:

  • Qs: Stage-wise test statistics.

  • vars: Stage-wise variance estimates for Qs.

  • raw.information: Information fractions prior to any adjustments for early completion or skipped analysis.

  • Wald: Stage-wise Wald statistics Qs/sqrt(vars).

  • consistent.bdry: Two-sided rejection boundaries computed using the consistent correlation matrix.

  • canonical.bdry: Two-sided rejection boundaries computed using the canonical correlation matrix.

  • consistent.reject: Indicator vector for boundary crossing under the consistent approach (only the the first crossing is retained).

  • canonical.reject: Indicator vector for boundary crossing under the canonical approach (only the the first crossing is retained).

  • nu: Final information fractions used for boundary construction.

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

  • total.ns: Total accrued sample size at each analysis.


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