Medical Prognosis

2 minute read

Prognosis

  • Prognosis- Predicting risk of future event.
    • event count be Death; Heart Attack; Stroke
  • Concordant pair - In general when the patient with the worst outcome has the higher risk score, this pair is called concordant.
    • Not ture for the outcome with same result. It should be different to perform concordant task.
  • Evaluation of Prognostic model
    • +1 for a permissible pair that is concordant
    • +0.5 for a permissible pair for risk tie.
  • C-Index computation:
    • \[C-index = \dfrac{\# concordant\ pairs + 0.5 * \# risk\ ties }{\# permissible\ pairs}\]
  • C-Index interpretation:
    • \[P(score(A) > score(B) | Y_A>Y_B)\]
  • Let’s compute the C-Index for following example

    Patient Event Risk
    A Yes 0.8
    B No 0.43
    C Yes 0.62
    D Yes 0.58
    E No 0.62
    • Here we have 5 partients, lets start with possible pairs:
      • AB; AC; AD; AE BC; BD; BE CD; CE DE
    • Now compute permissible pairs (they should have different outcomes)
      • AB; AE; BC; BD; CE; DE
    • From above permissible paris which are concordant pairs
      • AB; AE; BC; BD; DE
    • Risk ties:
      • CE
    • \[C-index = \dfrac{4 + 0.5 * 1}{6} = 0.75\]

Imputations

  • Imputation - filling up missing value in datasets.
    • Mean imputation - Take average of the column and fill those values in Training and Test datasets (where the values are missing). Do not compute mean for test seperately, it has to be filled with train mean.
    • Regression imputation - add a regressor to the column \(y = m * X + c\)

Survival Predictions

  • Estimating survival: How to estimate probability of survival past 25 months with censored observations ?
    • \[S(25) = (1-P_r(T=25|T>=25))(1-P_r(T=24|T>=24))...(1-P_r(T=0|T>=0))\]
    • Now , convert this to t
      • \[S(t)=\prod_{i=0}^t1-P_r(T=i|T>=i)\]
      • \[=\dfrac{\# died \ at \ i}{\# known \ survive \ to \ i}\]
      • \[S(t)=\prod_{i=0}^t1-\dfrac{d_i}{n_i}\]
      • Above one is also called as Kaplan Meier Estimate

Probability hazards

  • Learn strategies to build, evaluate survival function.
  • Earlier we have learned
    • What is the probability of survival past any time t
      • \[S(t)=P_r(T>t)\]
    • Survival to Hazard
    • What’s a patient’s immediate risk of death if they make it to time t
    • So, the hazard be:
      • $$\lambda(t) = P_r(T=t T\gt t)$$ (what is the risk of death if aged t )
    • What’s the patient’s accumulated hazard upto time t ?
      • \[\Lambda(t)\]
      • \[\Lambda(3)=\lambda(0)+\lambda(1)+\lambda(2)+\lambda(3)\]
      • \[\Lambda(t)=\sum_{i=0}^t\lambda(i)\]
      • \[\Lambda(t)=\int_0^t\lambda(i) d_i\]
    • Smoker v/s Non-Smoker
      • \[\lambda_{smoker}(t)=\lambda_0(t)exp(0.08 \times 1 + 0.01 \times age)\]
      • \[\lambda_{non\_smoker}(t)=\lambda_0(t)exp(0.08 \times 0 + 0.01 \times age)\]
      • \[\frac{\lambda_{smoker}}{\lambda_{non\_smoker}}=\frac{\lambda_0(t)exp(0.08+0.01 \ times age)}{\lambda_0(t)exp(0.01 \times age)}= \frac{exp(0.08)\times exp(0.01 \times age)}{exp(0.01 \times age)}=exp(0.08)=1.08\]
    • Now, effect of age on hazard
      • How much more risky is being 51 compared to 50

        \(\lambda_{51}(t)=\lambda_0(t)exp(0.08 \times is\_smoker + 0.01 \times 51)\) \(\lambda_{50}(t)=\lambda_0(t)exp(0.08 \times is\_smoker + 0.01 \times 50)\) \(\frac{\lambda_{51}(t)}{\lambda_{50}(t)}=\frac{exp(0.01 \times 51)}{exp(0.01 \times 50)}=exp(0.51-0.50)=1.01\)

    • Finally, following observation:
      • \[\lambda_{smoker}(t)= 1.08 \times \lambda_{non\_smoker}(t)\]
      • \[\lambda_{51}(t)=1.01 \times \lambda_{50}(t)\]
      Variable Weight exp(Weight)
      is_smoker 0.08 1.08
      age 0.01 1.01
      • Above are simply the exp of weights associated to formula. $exp(weight)$ risk factor increase for unit increase in variable.
    • Factor Risk increase or decrease
      • \[\lambda(t)=\lambda_0(t)exp(0.08 \times is\_smoker + 0.01 \times age)\]
      • \[\lambda(t)=\lambda_0(t)exp(\beta_1X_1+\beta_2X_2...)\]
      • \[= \lambda_0(t)exp(\sum_i\beta_iX_i)\]
    • Cummulative hazard or Nelson Aalen estimator
      • \[H(t)=\sum_{i=0}^t\frac {d_i}{n_i}\]
    • Harrell’s C-Index
      • +1 for a permissible pair that is concordant
      • +0.5 for a permissible pair that is a risk-tie.
      • \[C-Index = \frac{\# concordant pairs + 0.5 \times \# risk ties}{\# permissible pairs}\]
    • Calculating permissible pairs

      Patient T Risk
      A 15+ 0.65
      B 20 1.73
      C 5 0.70
      D 5+ 0.54
      E 10 0.83
      • Permissible pairs are : (A,C);(A,E);(B,C);(B,E);(C,D);(C,E)
      • Concordant paris (only look for permissible pairs): (A,C);(A,E);(C,D)
      • Risk Ties : None
      • \[C-Index = \frac{\# concordant pairs + \# Risk Ties}{\# permissible pairs}= \frac{3 + 0.5 \times 0}{6}=3/6=0.5\]

asdf