wlr {simtrial} | R Documentation |
Weighted logrank test
Description
Weighted logrank test
Usage
wlr(data, weight, return_variance = FALSE)
Arguments
data |
Dataset that has been cut, generated by |
weight |
Weighting functions, such as |
return_variance |
A logical flag that, if |
Details
-
z
- Standardized normal Fleming-Harrington weighted logrank test. -
i
- Stratum index. -
d_i
- Number of distinct times at which events occurred in stratumi
. -
t_{ij}
- Ordered times at which events in stratumi
,j = 1, 2, \ldots, d_i
were observed; for each observation,t_{ij}
represents the time post study entry. -
O_{ij.}
- Total number of events in stratumi
that occurred at timet_{ij}
. -
O_{ije}
- Total number of events in stratumi
in the experimental treatment group that occurred at timet_{ij}
. -
N_{ij.}
- Total number of study subjects in stratumi
who were followed for at least duration. -
E_{ije}
- Expected observations in experimental treatment group given random selection ofO_{ij.}
from those in stratumi
at risk at timet_{ij}
. -
V_{ije}
- Hypergeometric variance forE_{ije}
as produced inVar
fromcounting_process()
. -
N_{ije}
- Total number of study subjects in stratumi
in the experimental treatment group who were followed for at least durationt_{ij}
. -
E_{ije}
- Expected observations in experimental group in stratumi
at timet_{ij}
conditioning on the overall number of events and at risk populations at that time and sampling at risk observations without replacement:E_{ije} = O_{ij.} N_{ije}/N_{ij.}
-
S_{ij}
- Kaplan-Meier estimate of survival in combined treatment groups immediately prior to timet_{ij}
. -
\rho, \gamma
- Real parameters for Fleming-Harrington test. -
X_i
- Numerator for signed logrank test in stratumi
X_i = \sum_{j=1}^{d_{i}} S_{ij}^\rho(1-S_{ij}^\gamma)(O_{ije}-E_{ije})
-
V_{ij}
- Variance used in denominator for Fleming-Harrington weighted logrank testsV_i = \sum_{j=1}^{d_{i}} (S_{ij}^\rho(1-S_{ij}^\gamma))^2V_{ij})
The stratified Fleming-Harrington weighted logrank test is then computed as:
z = \sum_i X_i/\sqrt{\sum_i V_i}.
Value
A list containing the test method (method
),
parameters of this test method (parameter
),
point estimation of the treatment effect (estimation
),
standardized error of the treatment effect (se
),
Z-score (z
), p-values (p_value
).
Examples
x <- sim_pw_surv(n = 200) |> cut_data_by_event(100)
# Example 1: WLR test with FH wights
x |> wlr(weight = fh(rho = 0, gamma = 1))
x |> wlr(weight = fh(rho = 0, gamma = 1), return_variance = TRUE)
# Example 2: WLR test with MB wights
x |> wlr(weight = mb(delay = 4, w_max = 2))
# Example 3: WLR test with early zero wights
x |> wlr(weight = early_zero(early_period = 4))