TwoSample.Estimator.TTFE.sequential: Function to calculate the Z statistics and variance for the...

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

TwoSample.Estimator.TTFE.sequentialR Documentation

Function to calculate the Z statistics and variance for the time-to-first-event (TTFE) method.

Description

Computes a two-sample TTFE test statistics by retaining only the first observed event for each subject and applying a standard log-rank test. This function is intended as a comparator or benchmark to the mean-frequency based estimator implemented elsewhere in the package.

Usage

TwoSample.Estimator.TTFE.sequential(data)

Arguments

data

A data frame generated by TwoSamaple.generate.sequential().

Value

A list with:

  • Z.stat: The ordinary log-rank statistics on the Z-scale, defined as the square root of the chi-square statistic from survdiff().

  • var: The estimated variance of the test statistic. extracted from the log-rank test variance matrix.


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