TwoSample.Estimator.GT.sequential: Function to calculate the two-sample generalized-t statistic...

View source: R/TwoSample.Estimator.GT.sequential.R

TwoSample.Estimator.GT.sequentialR Documentation

Function to calculate the two-sample generalized-t statistic for composite endpoint under sequential monitoring.

Description

Computes a two-sample generalized t-test statistic for composite endpoints consisting of recurrent events and a terminal event, using data observed up to a given calendar time. Event times are converted from the calendar-time scale to the event-time scale (time since enrollment).

Usage

TwoSample.Estimator.GT.sequential(data, tau = 3)

Arguments

data

A data frame generated by TwoSample.generate.sequential() (optionally after applying Apply.calendar.censoring.2()) containing simulated two-sample composite endpoint data.

tau

Positive numeric value specifying the upper bound of event time for the integration. Default is 3.

Value

A list with components:

  • Q: Value of the generalized t-test statistics integrated over [0, tau].

  • var: Estimated asymptotic variance of Q.

  • const: Scaling constant used in the variance estimation.

Examples

# Two-sample generalized-t statistic: null hypothesis
df <- TwoSample.generate.sequential(sizevec = c(200, 200),
beta.trt = 0, calendar = 5, recruitment = 3,
random.censor.rate = 0.05, seed = 2026)
TwoSample.Estimator.GT.sequential(data = df, tau = 3)
# Two-sample generalized-t statistic: alternative hypothesis
df2 <- TwoSample.generate.sequential(sizevec = c(200, 200),
beta.trt = 0.8, calendar = 5, recruitment = 3,
random.censor.rate = 0.05, seed = 2026)
TwoSample.Estimator.GT.sequential(data = df2, tau = 3)


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