1
$\begingroup$

I have trained a data set with survival analysis using the cox method with time dependent covariates. The training data is set up to do the time-dependent analysis, where there are multiple rows for a single ID dependent on when the time-dependent covariates occur. The prediction is the "event".

For example, here is how a single observation is set up to do the time dependent piece.

enter image description here

My question is, after I trained the model, what format does my holdout set need to be for scoring? my scoring dataset is currently one row per observation. Do I need to deliberately duplicate my each observation multiple times so it has 4 rows with the same time start and time end dates?

my goal is that for each scored observation, I can look at the survival curve from 0 to 20.

$\endgroup$
1
  • 1
    $\begingroup$ I don’t know if you use SAS or R for your analysis, but if you use R, this link on time dependent covariates and coefficients might be helpful $\endgroup$ – treskov Sep 17 '20 at 21:50
1
$\begingroup$

With time-dependent covariates but time-independent hazard ratios, all that matters with respect to the probability of an event at a given time is the set of covariate values in place at that time. So if you want to do predictions on new cases for such a model, you simply treat those new cases as you did for those you used to build the model: one separate row representing each different set of covariate values for an individual, indicating the times over which that set of covariate values holds.

That said, be warned that predictions with time-dependent covariates can be tricky, presenting a risk of ending up with survivorship bias. Also, unless you have a very large set of data, your setting aside a completely separate holdout data set presents a risk of having an under-powered model along with too few cases to judge model performance reliably. Validation approaches based on bootstrapping will typically be better with most reasonably sized data sets.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.