Re: [問題] 請問R的問題

看板Statistics作者 (Mon_tresor)時間15年前 (2009/06/02 19:00), 編輯推噓1(103)
留言4則, 2人參與, 最新討論串2/2 (看更多)
我也有同樣的問題, 以下是我的指令: 我想計算Kaplan Meier estimator, days是觀察時間, status=1是死亡event survfit(Surv(days, status = = 1)) 可是output都一直出現: 錯誤在 Survfit requires a formula or a coxph fit as the first argument > ---- 我是參照書上範例打的, 請問有高手知道問題在哪嗎?? 謝謝^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 219.86.133.37

06/02 19:51, , 1F
你還少了一些東西,以下是R的範例,資料為內建的,網址給你參考
06/02 19:51, 1F

06/02 19:52, , 2F
survfit(Surv(time, status) ~ x, data=aml)
06/02 19:52, 2F

06/02 19:57, , 3F
更正: 在R視窗中鍵入 help("survfit")
06/02 19:57, 3F

06/02 20:09, , 4F
喔非常感謝!!!我試試~~~
06/02 20:09, 4F
文章代碼(AID): #1A9GPYtI (Statistics)
文章代碼(AID): #1A9GPYtI (Statistics)