goranbrostrom/eha

The Log-Rank Test

Closed this issue · 2 comments

Can anyone help me with this code? I have loaded the survival and eha packages.

with(oldmort, plot(Surv(enter, exit, event), strata = sex))

I get an error:

"strata" is not a graphical parameter
"strata" is not a graphical parameter
"strata" is not a graphical parameter
"strata" is not a graphical parameter
"strata" is not a graphical parameter
"strata" is not a graphical parameter

Thanks,

With the latest version of eha, you can use the new function 'logrank':

fit <- logrank(Surv(enter, exit, event), group = sex, data = oldmort)
plot(fit)
plot(fit, fn = "sur")

Note that the function eha:::plot.Surv was removed from eha in version 2.6.0, and the reason was the introduction of the function survival:::plot.Surv in the survival package. Unfortunately this means that you need to learn new arguments... when using plot.Surv.

Thanks