Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use estat concordance in a validation sample


    Hi, I am trying to internally validate the Cox proportional hazard model. I have split data (70% on which I have constructed the model and 30% on which I am trying to validate it). As for CPH model, we use Harrell's C (calculated using estat concordance) and it only runs on the data on which the model was constructed (70%) not on the data (30%) I am trying to validate. Is there any way I can use estat concordance in my validation sample to see how the model is performing? Any help will be appreciated. Thanks, Zia
    Last edited by Zia Chowdhury; 04 Dec 2020, 19:02.

  • #2
    Zia, did you ever figure out a way to do this?

    Comment


    • #3
      I just read the paper (Newson 2010) and figured it out. It not too difficult, but you do need to install somersd first:

      **Calculate Harrell's C on validation data
      *run model on training eg: stcox drug if testset==0
      predict hr1
      generate invhr1=1/hr1

      *Compute Harrels C on testset==1
      generate censind=1-_d if _st==1
      somersd _t invhr1 if _st==1 & testset==1, cenind(censind) tdist transf(c)

      *compare predict models if running more than one
      lincom invhr1-invhr2

      Comment

      Working...
      X