Closed w1806291 closed 3 years ago
Can anyone help me with this code? I have loaded the survival and eha packages.
par(mfrow = c(1, 2)) with(mort, plot(Surv(enter, exit, event), fn = "cum")) with(mort, plot(Surv(enter, exit, event), fn = "surv"))
I get an error:
"fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter
Thanks,
plot.Surv is a function in the survival package. It is a wrapper for plot.survfit, see its help page. You could try
with(mort, plot(Surv(enter, exit, event), fun = "cumhaz"))
etc. Göran
Thanks that works!
Can anyone help me with this code? I have loaded the survival and eha packages.
par(mfrow = c(1, 2)) with(mort, plot(Surv(enter, exit, event), fn = "cum")) with(mort, plot(Surv(enter, exit, event), fn = "surv"))
I get an error:
"fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter "fn" is not a graphical parameter
Thanks,