lrtest | R Documentation |
Obtains the log-rank test using the Fleming-Harrington family of weights.
lrtest(
data,
rep = "",
stratum = "",
treat = "treat",
time = "time",
event = "event",
rho1 = 0,
rho2 = 0
)
data |
The input data frame that contains the following variables:
|
rep |
The name of the replication variable in the input data. |
stratum |
The name of the stratum variable in the input data. |
treat |
The name of the treatment variable in the input data. |
time |
The name of the time variable in the input data. |
event |
The name of the event variable in the input data. |
rho1 |
The first parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test. |
rho2 |
The second parameter of the Fleming-Harrington family of weighted log-rank test. Defaults to 0 for conventional log-rank test. |
A data frame with the following variables:
uscore
: The numerator of the log-rank test statistic.
vscore
: The variance of the log-rank score test statistic.
logRankZ
: The Z-statistic value.
logRankPValue
: The one-sided p-value.
rho1
: The first parameter of the Fleming-Harrington weights.
rho2
: The second parameter of the Fleming-Harrington weights.
rep
: The replication.
Kaifeng Lu, kaifenglu@gmail.com
df <- lrtest(data = rawdata, rep = "iterationNumber",
stratum = "stratum", treat = "treatmentGroup",
time = "timeUnderObservation", event = "event",
rho1 = 0.5, rho2 = 0)
head(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.