How to use tmerge() for time-varying covariates with multiply imputed data?
I want to do a Cox PH model accommodates time-varying covariates. I learnt that I need to use tmerge() to transform the data into the start-stop format. But there is considerable missingness in baseline comorbidity score. Therefore, I used multiple imputation with mice() to impute this missing value. After MI, I am left with a multiply imputed data in mids format. I tried to use tmerge() within with() to try to transform each imputed dataset separately, which then generated a mira format output. But I don’t know how to display and check the transformed data in mira format, before I can do cox regression as the next step.
CoxTimeVaryingFitter – Baseline Hazards Using Strata in Python
I am applying strata on the Rossi dataset using CoxTimeVaryingFitter and when I call ctv.baseline_survival_ I am getting a dataframe with only one column, but expected two columns – one for each strata. When I try the same thing for CoxPHFitter (static only), I get two columns – one for each value of ‘wexp’.