Hi
I try to use function ggcoxdiagnostics() plots with a parametr ox.scale="time" as provided in survminer cheatsheet
library("survival")
library("survminer")
fit <- coxph(Surv(time, status) ~sex + age, data = lung)
ggcoxdiagnostics(fit, type = "schoenfeld", ox.scale = "time")
And here screenshot from sheet that I would be expected
And here what I really get, with message in console:
Warning messages:
1: In ggcoxdiagnostics(fit_l, type = "schoenfeld", ox.scale = "time") :
NAs introduced by coercion
2: Removed 330 rows containing non-finite values
(stat_smooth).
3: Removed 330 rows containing missing values
(geom_point).
So what wrong? (expect using parametr ecog.ps)