gestate无法识别数字变量

问题描述 投票:0回答:1

我有一个生存数据集,想使用软件包gestate进行分析。当我打算拟合模型时,将获得:

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

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

但是,当我瞥见我的数据时,会得到:

enter image description here

所以,两个变量都是数字。

我不知道它在哪里失败。

r survival
1个回答
0
投票

感谢艾伦。在您提出建议并与James Bell(gestate软件包的作者之一)进行了一些互动之后,我发现,如果我通过as.dataframe(survdata)将小标题更改为数据帧,它将起作用。

© www.soinside.com 2019 - 2024. All rights reserved.