powered by
Performs the log-rank test on survival data, possibly stratified.
logrank(Y, group, data = parent.frame())
A list of class logrank with components
logrank
The logrank (score) test statistic.
The degrees of freedom of the test statistic.
The p value of the test.
A list of two-column matrices, describing event times and corresponding hazard atoms in each stratum (class 'hazdata').
The call
a survival object as returned by the Surv function.
Surv
defines the groups to be compared. Coerced to a factor.
a data.frame in which to interpret the variables.
Göran Broström
coxreg, print.logrank.
coxreg
print.logrank
fit <- logrank(Y = Surv(enter, exit, event), group = civ, data = oldmort[oldmort$region == "town", ]) fit
Run the code above in your browser using DataLab