Consider the attached (dummy) sample csv file where two methods (i.e. Method A and Method B) are used to evaluate time to progression (PFS) in cancer patients. For each patient we also have the overall survival (OS).
data available as CSV from here
What I´d like to investigate is whether the PFS with method A or B better predicts overall survival of the patient.
I thought about two Cox models where the PFS (of method A or B) is included as a time-dependent covariate (using coxph) and later compare the performance of both models e.g. with C-index or Brier scores (e.g. with the pec library). Is this approach reasonable?
Unfortunately I already struggle with setting up the required dataframe correctly (because the methodA or B column that are generated though tmerge contain NA values despite disease progression in the relevant columns which does not correspond to the underlying data):
library(survival)
df_test <- read.table(file = "https://www.dropbox.com/s/vqns04vheqt57nk/cox.csv?dl=1", header = TRUE, sep=";")
df_test_methodA<-tmerge(data1=df_test,data2=df_test,id=Patient_ID,
endpt = event(OS_time, OS_event),
methodA = tdc(Method_A_PFS_time,Method_A_PFS_event))
df_test_methodB<-tmerge(data1=df_test,data2=df_test,id=Patient_ID,
endpt = event(OS_time, OS_event),
methodB = tdc(Method_B_PFS_time,Method_B_PFS_event))
View(df_test_methodA)
View(df_test_methodB)
Your help and input would be highly appreciated. Thank you.