Survdiff p-value comparison

和自甴很熟 提交于 2019-12-24 19:24:53

问题


I am trying to run a survival analysis on a set of data I have collected. In this data frame (m3), each row is a new patient and each column is a mutation I have identified. I have made a binary data table to indicate whether each patient is positive or negative for the mutation. I can run a survfit function for each column(mutation), but I have hundreds and want to loop through them. I have written the following code, but don't think it is correct (nothing is being output).

for (i in m3[,2:256]) {survdiff(Surv(m3$Overall.Survival, m3$Status) ~ i, 
data = m3)}

Once I gather this data I want to make a table with each mutation (column) as a row and put the p-value from this survfit object as the column.

I'm not sure why I don't have any output for the for loop and even more so how to generate the new data frame. I believe I would be subsetting it.

来源:https://stackoverflow.com/questions/48726437/survdiff-p-value-comparison

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!