Learn R Programming

eha (version 2.11.2)

logrank: The Log-rank test

Description

Performs the log-rank test on survival data, possibly stratified.

Usage

logrank(Y, group, data = parent.frame())

Value

A list of class logrank with components

test.statistic

The logrank (score) test statistic.

df

The degrees of freedom of the test statistic.

p.value

The p value of the test.

hazards

A list of two-column matrices, describing event times and corresponding hazard atoms in each stratum (class 'hazdata').

call

The call

Arguments

Y

a survival object as returned by the Surv function.

group

defines the groups to be compared. Coerced to a factor.

data

a data.frame in which to interpret the variables.

Author

Göran Broström

See Also

coxreg, print.logrank.

Examples

Run this code
fit <- logrank(Y = Surv(enter, exit, event), group = civ, 
data = oldmort[oldmort$region == "town", ])
fit

Run the code above in your browser using DataLab