| lr_cov | R Documentation |
Returns the mean vector and covariance matrix of the standardized log-rank statistics Z(t_1), ..., Z(t_K) of one endpoint, or of PFS and OS together.
lr_cov(
scenario,
n,
calendar_time,
endpoint = "os",
mean = c("direct", "schoenfeld"),
variance = c("null", "alternative", "studentized"),
trigger = NULL
)
scenario |
An |
n |
Total sample size. |
calendar_time |
Strictly increasing calendar times (positive). |
endpoint |
|
mean |
|
variance |
|
trigger |
Endpoint whose observed number of events determines each
calendar time ( |
With variance = "null" the statistics have unit variances and
correlations sqrt(V(t_j) / V(t_k)) for t_j <= t_k, from the
independent increments of the score (Tsiatis 1981). With
variance = "alternative" the covariance of the score under the
alternative is that of Luo et al. (2019), computed here from the
per-patient influence functions of the score, and is divided by
sqrt(V(t_j) V(t_k)).
With variance = "studentized" the covariance is the asymptotic
covariance of Z = -U / sqrt(V-hat) itself, where V-hat is the usual
variance estimator. The per-patient influence function of Z adds to that
of the score a term for the variability of V-hat and, for times determined
by the observed number of events of an endpoint (trigger), a term
for the variability of the analysis time. Both terms vanish under the null
hypothesis.
For PFS and OS together (endpoint = c("pfs", "os")) the statistics
are ordered by endpoint and then by time. With "studentized" all
covariances come from the influence functions. With "null" the
statistics of one endpoint have the covariances described above and the
correlations between the endpoints are those of the studentized
statistics. With "alternative" the covariances between the
endpoints are the covariances of the scores divided by
sqrt(V_P V_O). Under the null hypothesis the three choices agree,
and the covariance between the endpoints is that of Danzer et al. (2025,
Theorem 1).
With switching from a calendar time (switch_start of
ms_scenario), the hazard of OS depends on the entry time
and the score has no independent increments, even under the null
hypothesis. The means, information and covariances of OS then integrate
over the entry time, with the proportion in the risk set and the pooled
hazard of each calendar time. With "null" the statistics have unit
variances and the correlations of the studentized statistics (which,
under the null hypothesis, are the exact correlations), with
"alternative" the covariances of the scores divided by
sqrt(V_j V_k), and with "studentized" the covariances of
the studentized statistics; trigger is used with all three. Only
OS alone with mean = "direct" is covered; PFS is not affected.
A list with time, endpoint, events,
info, mean (mean vector of Z) and sigma
(covariance matrix of Z), with one element (row) per endpoint and time.
Tsiatis AA (1981). The asymptotic joint distribution of the efficient scores test for the proportional hazards model calculated over time. Biometrika 68:311-315.
Luo X, Mao X, Chen X, Qiu J, Bai S, Quan H (2019). Design and monitoring of survival trials in complex scenarios. Statistics in Medicine 38:192-209.
Danzer MF, Rufibach K, Beyersmann J, Schmidt R (2025). Exhausting the type I error level in event-driven group-sequential designs with a closed testing procedure for progression-free and overall survival. arXiv:2512.08658.
lr_moments, gs_prob
ctl <- ms_model(death = log(2) / 12)
trt <- ms_model(death = 0.7 * log(2) / 12)
scn <- ms_scenario(ctl, trt, accrual = ms_accrual(rate = 20))
lr_cov(scn, n = 400, calendar_time = c(24, 36))
fl <- ms_scenario(ms_fleischer(3, 9), ms_fleischer(4.3, 12.9),
accrual = ms_accrual(rate = 20))
lr_cov(fl, n = 400, calendar_time = 30, endpoint = c("pfs", "os"),
variance = "studentized")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.