Hi, new here so please excuse me if I fall foul.
Trying to do some survival analysis of a dataset, using survfit() and ggsurvplot(). The variable I'm using is either high or low, but some of these values are missing.
I've run the same script on my Mac, and it doesn't include the missing values. But when I run it on my desktop, there are three lines on the resulting plot: high, low, and a category without a name, presumably the missing values.
I was wondering if anyone knows how why this occurs on my desktop and not my Mac.
Script:
survobject = Surv(data$time, event = data$status)
variablefit = survfit(survobject ~ variable, data = data)
ggsurvplot(variablefit, data = data, pval=TRUE, conf.int=TRUE)
Thanks for any help/tips!