title: Lifelines Survival Analysis in Python. What is the partial hazard in that method?
body: <p>I am trying to use Python Lifelines package to calibrate and use Cox proportional hazard model.</p>
  
  <p>So, the result summary is:</p>
  
  <pre><code>coef  exp(coef)  se(coef)        z      p  lower 0.95  upper 0.95 
  PD    -1.1446     0.3183    0.0814 -14.0563 0.0000     -1.3042     -0.9850  ***
  oil   -0.1275     0.8803    0.0016 -79.2128 0.0000     -0.1306     -0.1243  ***
  curr  -0.1353     0.8735    0.0020 -67.3416 0.0000     -0.1392     -0.1313  ***
  matur -0.0002     0.9998    0.0000 -13.6039 0.0000     -0.0002     -0.0002  ***
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  Concordance = 0.602
  </code></pre>
  
  <p>Then i need to calculate partial hazard, for example, using first row of my survival data tab, which is:</p>
  
  <pre><code>PD  oil curr    Durat   binar   matur
  0   0.135760    62.799048   59.004243   1.446575    0   179
  </code></pre>
  
  <p>it must be like that:</p>
  
  <pre><code>PD = 0.13576
  oil = 62.799048
  curr = 59.004243
  matur = 179
  np.exp(-1.1446*PD - 0.1275*oil - 0.1353*curr -0.0002*matur)
  </code></pre>
  
  <p>and equal to 9.387106981409155e-08, so it's very small figure and lead to Survival Probability equal to 1.0 for all t. But when i got a cph.predict_partial_hazard(cox_surv) method it gave me something like 0.32, and this correct figure, i think. For, example we have Baseline SP = 0.7 and by (0.7^0.32) to partial hazard we will get something like 0.892136633056215, it's normal. What is the mistake? How can we calculate partial hazard in a correct way? Thanks a lot!</p>