0

I have a survival dataset and want to use package gestate for analysis. When I intent to fit model I obtain:

fit2 <- fit_tte_data(data=survdata,Time="dias",Event="entrega",censoringOne=F,type="automatic")

Error in Surv(T, E) : Time variable is not numeric

But, when I use glimpse to examine my data I obtain:

enter image description here

So, both variables ar numeric.

I don't understand where it fails.

panchtox
  • 634
  • 7
  • 16
  • I can't replicate this fault. The code works for me with a random sample of doubles for `dias` and a binomial sample for `entrega`. Perhaps you could type `dput(survdata)` into the console and copy / paste the result into your question? – Allan Cameron May 18 '20 at 14:59

1 Answers1

0

Thanks Allan. After your suggestion and some interaction with James Bell (one of the authors of gestate package), I've found that if I change my tibble to a dataframe by means of as.dataframe(survdata) it works.

panchtox
  • 634
  • 7
  • 16