LR | R Documentation |
Log-Rank test between an observed and an expected survival curve
LR(futime, status, age, sex, entry_date, ratetable = survexp.fr::survexp.fr)
futime |
follow-up time of the subjects in days |
status |
0 if censored or 1 if dead at |
age |
age in days |
sex |
|
entry_date |
entry date in the study |
ratetable |
a table of event rates, such as |
The Log-Rank is calculated as:
LR = (O-E)^2/E
where O
is the observed number of deaths and E
is the expected number based on the patients' characteristics (sex, age and entry date in the study).
It follows a Khi-2 distribution with one degree of freedom, which allows to compute its p-value.
A list containing the observed number of deaths, the expected number of deaths, the Log-Rank statistic and its p-value
Hugo Varet
R. Peto and J. Peto, Asymptotically Efficient Rank Invariant Test Procedures, Journal of the Royal Statistical Society, 1972
attach(data.example)
LR(futime, status, age, sex, entry_date)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.