總結實作:Cox 模型
在課程的最後,讓我們回頭看看這 2 章中曾短暫使用過的肺癌資料集。簡要回顧:這個資料集包含 North Central Cancer Treatment Group 所收集的晚期肺癌病患存活資訊。事件記錄在變數 status 中,若個案未存活則其值為 2。表現分數(變數 performance)由醫師評估,用來衡量病患執行日常活動的能力(差=0,佳=100)。我們想了解特定表現分數與存活時間之間的關聯。
本練習屬於課程
R 的生存分析
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Compute Cox model and survival curves
cxmod <- ___(___(___, ___) ~ ___, data = lung)
new_lung <- data.frame(performance = ___)
cxsf <- ___(cxmod, data = ___, newdata = ___, conf.type = "none")