Announcement

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

  • How to calculate the “optimism-corrected" or biased-corrected c-statistic (or Sommer's D) for a Cox regression model after bootstrapping

    Hello,

    I have obtained a Cox-regression model of the risk of suffering an acute asthma attack, and I want to assess it's internal validity. I have estimated the c-statistic of this model, as it is a measure of the predictive ability of this model. I would now like to estimate the 'over-fitting' or optimism of my model to be able to calibrate it accordingly. The amount of shrinkage to calibrate for can be determined by comparing the model’s c statistic (called the apparent c statistic) to the c statistic computed by nonparametric bootstrap resampling (which I will call the honest c statistic or optimism-corrected c-statistic.

    I have tried several different commands, but all I obtain is a biased-corrected confidence interval for the 'apparent c statistic' and a 'bias' estimate. My question is: Should I just add this 'bias' to the 'apparent c statistic' to obtain the 'optimism-corrected c statistic'? If not, how can I estimate it?

    This is what I have tried: My model includes 3 variables: age (Edad) Asthma dx (asma) and number of corticosteroids courses (Vecescorticoidesivim)

    *Step 1
    stcox Edad Asma Vecescorticoidesivim
    estat concordance

    return list

    matrix concordance = ( r(N), r(D), r(C), r(n_P), r(n_E), r(n_T))
    matrix list concordance

    *Step 2
    capture program drop myboot2
    program define myboot2, rclass
    preserve
    bsample
    stcox Edad Asma Vecescorticoidesivim
    estat concordance
    return scalar N = r(N)
    return scalar D = r(D)
    return scalar C = r(C)
    return scalar n_P = r(n_P)
    return scalar n_E = r(n_E)
    return scalar n_T = r(n_T)
    restore
    end

    *Step 3
    simulate N=r(N) D=r(D) C=r(C) n_P=r(n_P) n_E=r(n_E) n_T=r(n_T), ///
    reps(200) seed(12345): myboot2

    bstat, stat(concordance) n(100)

    estat bootstrap, all


    And this is the result:


    Observed coefficient Bias Bootstrsp Std. Err. 95% Conf Interval Type
    D 0.29717226 0.007564 0.04701595 0.205-0.389 N
    0.216-0.392 P
    0.211-0.381 BC
    C 0.64858613 0.003782 0.02350797 0.603-0.695 N
    0.608-0.696 P
    0.605-0.691 BC



    The only interesting values are the 'C' (Harrel's C or c-statistic) and the D (Sommer's D).


    Thank you!
    Attached Files
    Last edited by Cristina Ardura; 06 Aug 2016, 16:32.
Working...
X