Using Surv() function in R for left censored data and cox regression

66 Views Asked by At

I want to do a survival analysis and cox regression for metastasis data to see if there are any significant genes associated with early metastasis. The data set has gene names as columns, time at first visit, time at last follow-up, status (metastasis present or not), time (interval between first visit and follow up). The values of the gene columns are 0 or 1 to indicate Wild type or altered. So the columns for the data would be: TP32, EGFR, KRAS, MYC,..., FirstVisit, LastVisit, Time, Status. The time at last follow up column would be the time at first metastasis presentation if metastasis occurred, and if no metastasis occurred, he last follow-up date. Normally, I would code the survival analysis and cox regression like this: coxph( Surv(time, status) ~ gene1 + gene2 + gene3 +..., data = my_df) How would you do a left-censoring for this scenario, and how would you handle patients who already have metastasis at first visit? Would you just completely exclude them? How to repeat this analysis with Death as a competing risk?

for a normal competing risk with cox regression, would this work? coxph( Surv(time, status) ~ gene1 + gene2 + gene3 +..., data = my_df) except status would have values of 0, 1, or 2 with 2 indicating a competing event (Death) occurred

0

There are 0 best solutions below