Mercurial > repos > fubar > lifelines_km_cph_tool
comparison lifelines_tool/test-data/readme_sample @ 2:dd5e65893cb8 draft default tip
add survival and collapsed life table outputs suggested by Wolfgang
| author | fubar |
|---|---|
| date | Thu, 10 Aug 2023 22:52:45 +0000 |
| parents | 232b874046a7 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:232b874046a7 | 2:dd5e65893cb8 |
|---|---|
| 1 ## Lifelines tool starting. | 1 ## Lifelines tool |
| 2 Using data header = Index(['Unnamed: 0', 'week', 'arrest', 'fin', 'age', 'race', 'wexp', 'mar', | 2 Input data header = Index(['Unnamed: 0', 'week', 'arrest', 'fin', 'age', 'race', 'wexp', 'mar', |
| 3 'paro', 'prio'], | 3 'paro', 'prio'], |
| 4 dtype='object') time column = week status column = arrest | 4 dtype='object') time column = week status column = arrest |
| 5 Logrank test for race - 0 vs 1 | 5 Logrank test for race - 0 vs 1 |
| 6 | 6 |
| 7 <lifelines.StatisticalResult: logrank_test> | 7 <lifelines.StatisticalResult: logrank_test> |
| 12 test_name = logrank_test | 12 test_name = logrank_test |
| 13 | 13 |
| 14 --- | 14 --- |
| 15 test_statistic p -log2(p) | 15 test_statistic p -log2(p) |
| 16 0.58 0.45 1.16 | 16 0.58 0.45 1.16 |
| 17 #### Survival table using time week and event arrest | |
| 18 removed observed censored entrance at_risk | |
| 19 event_at | |
| 20 0.0 0 0 0 432 432 | |
| 21 1.0 1 1 0 0 432 | |
| 22 2.0 1 1 0 0 431 | |
| 23 3.0 1 1 0 0 430 | |
| 24 4.0 1 1 0 0 429 | |
| 25 5.0 1 1 0 0 428 | |
| 26 6.0 1 1 0 0 427 | |
| 27 7.0 1 1 0 0 426 | |
| 28 8.0 5 5 0 0 425 | |
| 29 9.0 2 2 0 0 420 | |
| 30 10.0 1 1 0 0 418 | |
| 31 11.0 2 2 0 0 417 | |
| 32 12.0 2 2 0 0 415 | |
| 33 13.0 1 1 0 0 413 | |
| 34 14.0 3 3 0 0 412 | |
| 35 15.0 2 2 0 0 409 | |
| 36 16.0 2 2 0 0 407 | |
| 37 17.0 3 3 0 0 405 | |
| 38 18.0 3 3 0 0 402 | |
| 39 19.0 2 2 0 0 399 | |
| 40 20.0 5 5 0 0 397 | |
| 41 21.0 2 2 0 0 392 | |
| 42 22.0 1 1 0 0 390 | |
| 43 23.0 1 1 0 0 389 | |
| 44 24.0 4 4 0 0 388 | |
| 45 25.0 3 3 0 0 384 | |
| 46 26.0 3 3 0 0 381 | |
| 47 27.0 2 2 0 0 378 | |
| 48 28.0 2 2 0 0 376 | |
| 49 30.0 2 2 0 0 374 | |
| 50 31.0 1 1 0 0 372 | |
| 51 32.0 2 2 0 0 371 | |
| 52 33.0 2 2 0 0 369 | |
| 53 34.0 2 2 0 0 367 | |
| 54 35.0 4 4 0 0 365 | |
| 55 36.0 3 3 0 0 361 | |
| 56 37.0 4 4 0 0 358 | |
| 57 38.0 1 1 0 0 354 | |
| 58 39.0 2 2 0 0 353 | |
| 59 40.0 4 4 0 0 351 | |
| 60 42.0 2 2 0 0 347 | |
| 61 43.0 4 4 0 0 345 | |
| 62 44.0 2 2 0 0 341 | |
| 63 45.0 2 2 0 0 339 | |
| 64 46.0 4 4 0 0 337 | |
| 65 47.0 1 1 0 0 333 | |
| 66 48.0 2 2 0 0 332 | |
| 67 49.0 5 5 0 0 330 | |
| 68 50.0 3 3 0 0 325 | |
| 69 52.0 322 4 318 0 322 | |
| 70 #### Life table using time week and event arrest | |
| 71 removed observed censored at_risk | |
| 72 event_at | |
| 73 (-0.001, 13.844] 20 20 0 432 | |
| 74 (13.844, 27.687] 36 36 0 412 | |
| 75 (27.687, 41.531] 29 29 0 376 | |
| 76 (41.531, 55.374] 347 29 318 347 | |
| 17 ### Lifelines test of Proportional Hazards results with prio, age, race, paro, mar, fin as covariates on KM and CPH in lifelines test | 77 ### Lifelines test of Proportional Hazards results with prio, age, race, paro, mar, fin as covariates on KM and CPH in lifelines test |
| 18 <lifelines.CoxPHFitter: fitted with 432 total observations, 318 right-censored observations> | 78 <lifelines.CoxPHFitter: fitted with 432 total observations, 318 right-censored observations> |
| 19 duration col = 'week' | 79 duration col = 'week' |
| 20 event col = 'arrest' | 80 event col = 'arrest' |
| 21 baseline estimation = breslow | 81 baseline estimation = breslow |
| 22 number of observations = 432 | 82 number of observations = 432 |
| 23 number of events observed = 114 | 83 number of events observed = 114 |
| 24 partial log-likelihood = -659.00 | 84 partial log-likelihood = -659.00 |
| 25 time fit was run = 2023-08-10 05:49:04 UTC | 85 time fit was run = 2023-08-10 12:00:14 UTC |
| 26 | 86 |
| 27 --- | 87 --- |
| 28 coef exp(coef) se(coef) coef lower 95% coef upper 95% exp(coef) lower 95% exp(coef) upper 95% | 88 coef exp(coef) se(coef) coef lower 95% coef upper 95% exp(coef) lower 95% exp(coef) upper 95% |
| 29 covariate | 89 covariate |
| 30 prio 0.10 1.10 0.03 0.04 0.15 1.04 1.16 | 90 prio 0.10 1.10 0.03 0.04 0.15 1.04 1.16 |
