survival 1.1.5__cp314-cp314-macosx_10_12_x86_64.whl → 1.1.26__cp314-cp314-macosx_10_12_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of survival might be problematic. Click here for more details.
- survival/survival.cpython-314-darwin.so +0 -0
- {survival-1.1.5.dist-info → survival-1.1.26.dist-info}/METADATA +70 -5
- survival-1.1.26.dist-info/RECORD +8 -0
- {survival-1.1.5.dist-info → survival-1.1.26.dist-info}/WHEEL +1 -1
- survival-1.1.5.dist-info/RECORD +0 -8
- {survival-1.1.5.dist-info → survival-1.1.26.dist-info}/licenses/LICENSE +0 -0
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: survival
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.26
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Science/Research
|
|
6
6
|
Classifier: Intended Audience :: Healthcare Industry
|
|
@@ -30,9 +30,9 @@ Maintainer-email: Cameron Lyons <cameron.lyons2@gmail.com>
|
|
|
30
30
|
License: MIT
|
|
31
31
|
Requires-Python: >=3.9
|
|
32
32
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
33
|
-
Project-URL: Repository, https://github.com/Cameron-Lyons/survival
|
|
34
33
|
Project-URL: Documentation, https://github.com/Cameron-Lyons/survival#readme
|
|
35
34
|
Project-URL: Issues, https://github.com/Cameron-Lyons/survival/issues
|
|
35
|
+
Project-URL: Repository, https://github.com/Cameron-Lyons/survival
|
|
36
36
|
|
|
37
37
|
# survival
|
|
38
38
|
|
|
@@ -78,7 +78,7 @@ pip install survival
|
|
|
78
78
|
|
|
79
79
|
#### Prerequisites
|
|
80
80
|
|
|
81
|
-
- Python 3.
|
|
81
|
+
- Python 3.10+
|
|
82
82
|
- Rust (see [rustup.rs](https://rustup.rs/))
|
|
83
83
|
- [maturin](https://github.com/PyO3/maturin)
|
|
84
84
|
|
|
@@ -386,6 +386,57 @@ print(f"Degrees of freedom: {result.degrees_of_freedom}")
|
|
|
386
386
|
print(f"Variance matrix: {result.variance}")
|
|
387
387
|
```
|
|
388
388
|
|
|
389
|
+
### Built-in Datasets
|
|
390
|
+
|
|
391
|
+
The library includes 30 classic survival analysis datasets:
|
|
392
|
+
|
|
393
|
+
```python
|
|
394
|
+
from survival import load_lung, load_aml, load_veteran
|
|
395
|
+
|
|
396
|
+
# Load the lung cancer dataset
|
|
397
|
+
lung = load_lung()
|
|
398
|
+
print(f"Columns: {lung['columns']}")
|
|
399
|
+
print(f"Number of rows: {len(lung['data'])}")
|
|
400
|
+
|
|
401
|
+
# Load the acute myelogenous leukemia dataset
|
|
402
|
+
aml = load_aml()
|
|
403
|
+
|
|
404
|
+
# Load the veteran's lung cancer dataset
|
|
405
|
+
veteran = load_veteran()
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Available datasets:**
|
|
409
|
+
- `load_lung()` - NCCTG Lung Cancer Data
|
|
410
|
+
- `load_aml()` - Acute Myelogenous Leukemia Survival Data
|
|
411
|
+
- `load_veteran()` - Veterans' Administration Lung Cancer Study
|
|
412
|
+
- `load_ovarian()` - Ovarian Cancer Survival Data
|
|
413
|
+
- `load_colon()` - Colon Cancer Data
|
|
414
|
+
- `load_pbc()` - Primary Biliary Cholangitis Data
|
|
415
|
+
- `load_cgd()` - Chronic Granulomatous Disease Data
|
|
416
|
+
- `load_bladder()` - Bladder Cancer Recurrences
|
|
417
|
+
- `load_heart()` - Stanford Heart Transplant Data
|
|
418
|
+
- `load_kidney()` - Kidney Catheter Data
|
|
419
|
+
- `load_rats()` - Rat Treatment Data
|
|
420
|
+
- `load_stanford2()` - Stanford Heart Transplant Data (Extended)
|
|
421
|
+
- `load_udca()` - UDCA Clinical Trial Data
|
|
422
|
+
- `load_myeloid()` - Acute Myeloid Leukemia Clinical Trial
|
|
423
|
+
- `load_flchain()` - Free Light Chain Data
|
|
424
|
+
- `load_transplant()` - Liver Transplant Data
|
|
425
|
+
- `load_mgus()` - Monoclonal Gammopathy Data
|
|
426
|
+
- `load_mgus2()` - Monoclonal Gammopathy Data (Updated)
|
|
427
|
+
- `load_diabetic()` - Diabetic Retinopathy Data
|
|
428
|
+
- `load_retinopathy()` - Retinopathy Data
|
|
429
|
+
- `load_gbsg()` - German Breast Cancer Study Group Data
|
|
430
|
+
- `load_rotterdam()` - Rotterdam Tumor Bank Data
|
|
431
|
+
- `load_logan()` - Logan Unemployment Data
|
|
432
|
+
- `load_nwtco()` - National Wilms Tumor Study Data
|
|
433
|
+
- `load_solder()` - Solder Joint Data
|
|
434
|
+
- `load_tobin()` - Tobin's Tobit Data
|
|
435
|
+
- `load_rats2()` - Rat Tumorigenesis Data
|
|
436
|
+
- `load_nafld()` - Non-Alcoholic Fatty Liver Disease Data
|
|
437
|
+
- `load_cgd0()` - CGD Baseline Data
|
|
438
|
+
- `load_pbcseq()` - PBC Sequential Data
|
|
439
|
+
|
|
389
440
|
## API Reference
|
|
390
441
|
|
|
391
442
|
### Classes
|
|
@@ -400,12 +451,15 @@ print(f"Variance matrix: {result.variance}")
|
|
|
400
451
|
|
|
401
452
|
**Survival Curves:**
|
|
402
453
|
- `SurvFitKMOutput`: Output from Kaplan-Meier survival curve fitting
|
|
454
|
+
- `SurvfitKMOptions`: Options for Kaplan-Meier fitting
|
|
455
|
+
- `KaplanMeierConfig`: Configuration for Kaplan-Meier
|
|
403
456
|
- `SurvFitAJ`: Output from Aalen-Johansen survival curve fitting
|
|
404
457
|
- `NelsonAalenResult`: Output from Nelson-Aalen estimator
|
|
405
458
|
- `StratifiedKMResult`: Output from stratified Kaplan-Meier
|
|
406
459
|
|
|
407
460
|
**Parametric Models:**
|
|
408
461
|
- `SurvivalFit`: Output from parametric survival regression
|
|
462
|
+
- `SurvregConfig`: Configuration for parametric survival regression
|
|
409
463
|
- `DistributionType`: Distribution types for parametric models (extreme_value, logistic, gaussian, weibull, lognormal)
|
|
410
464
|
- `FineGrayOutput`: Output from Fine-Gray competing risks model
|
|
411
465
|
|
|
@@ -415,6 +469,7 @@ print(f"Variance matrix: {result.variance}")
|
|
|
415
469
|
- `TrendTestResult`: Output from trend tests
|
|
416
470
|
- `TestResult`: General test result output
|
|
417
471
|
- `ProportionalityTest`: Output from proportional hazards test
|
|
472
|
+
- `SurvObrienResult`: Output from O'Brien transformation
|
|
418
473
|
|
|
419
474
|
**Validation:**
|
|
420
475
|
- `BootstrapResult`: Output from bootstrap confidence interval calculations
|
|
@@ -445,6 +500,10 @@ print(f"Variance matrix: {result.variance}")
|
|
|
445
500
|
**Utilities:**
|
|
446
501
|
- `CoxCountOutput`: Output from Cox counting functions
|
|
447
502
|
- `SplitResult`: Output from time-splitting
|
|
503
|
+
- `CondenseResult`: Output from data condensing
|
|
504
|
+
- `Surv2DataResult`: Output from survival-to-data conversion
|
|
505
|
+
- `TimelineResult`: Output from timeline conversion
|
|
506
|
+
- `IntervalResult`: Output from interval calculations
|
|
448
507
|
- `LinkFunctionParams`: Link function parameters
|
|
449
508
|
- `CchMethod`: Case-cohort method specification
|
|
450
509
|
- `CohortData`: Cohort data structure
|
|
@@ -458,6 +517,7 @@ print(f"Variance matrix: {result.variance}")
|
|
|
458
517
|
|
|
459
518
|
**Survival Curves:**
|
|
460
519
|
- `survfitkm(...)`: Fit Kaplan-Meier survival curves
|
|
520
|
+
- `survfitkm_with_options(...)`: Fit Kaplan-Meier with configuration options
|
|
461
521
|
- `survfitaj(...)`: Fit Aalen-Johansen survival curves (multi-state)
|
|
462
522
|
- `nelson_aalen_estimator(...)`: Calculate Nelson-Aalen estimator
|
|
463
523
|
- `stratified_kaplan_meier(...)`: Calculate stratified Kaplan-Meier curves
|
|
@@ -473,6 +533,7 @@ print(f"Variance matrix: {result.variance}")
|
|
|
473
533
|
- `wald_test_py(...)`: Wald test
|
|
474
534
|
- `score_test_py(...)`: Score test
|
|
475
535
|
- `ph_test(...)`: Proportional hazards assumption test
|
|
536
|
+
- `survobrien(...)`: O'Brien transformation for survival data
|
|
476
537
|
|
|
477
538
|
**Residuals:**
|
|
478
539
|
- `coxmart(...)`: Calculate Cox martingale residuals
|
|
@@ -484,7 +545,7 @@ print(f"Variance matrix: {result.variance}")
|
|
|
484
545
|
- `perform_concordance1_calculation(...)`: Calculate concordance index (version 1)
|
|
485
546
|
- `perform_concordance3_calculation(...)`: Calculate concordance index (version 3)
|
|
486
547
|
- `perform_concordance_calculation(...)`: Calculate concordance index (version 5)
|
|
487
|
-
- `
|
|
548
|
+
- `compute_concordance(...)`: General concordance calculation
|
|
488
549
|
|
|
489
550
|
**Validation:**
|
|
490
551
|
- `bootstrap_cox_ci(...)`: Bootstrap confidence intervals for Cox models
|
|
@@ -527,6 +588,10 @@ print(f"Variance matrix: {result.variance}")
|
|
|
527
588
|
- `perform_score_calculation(...)`: Calculate score statistics
|
|
528
589
|
- `perform_agscore3_calculation(...)`: Calculate score statistics (version 3)
|
|
529
590
|
- `survsplit(...)`: Split survival data at specified times
|
|
591
|
+
- `survcondense(...)`: Condense survival data by collapsing adjacent intervals
|
|
592
|
+
- `surv2data(...)`: Convert survival objects to data format
|
|
593
|
+
- `to_timeline(...)`: Convert data to timeline format
|
|
594
|
+
- `from_timeline(...)`: Convert from timeline format to intervals
|
|
530
595
|
- `tmerge(...)`: Merge time-dependent covariates
|
|
531
596
|
- `tmerge2(...)`: Merge time-dependent covariates (version 2)
|
|
532
597
|
- `tmerge3(...)`: Merge time-dependent covariates (version 3)
|
|
@@ -557,7 +622,7 @@ The `PSpline` class provides penalized spline smoothing:
|
|
|
557
622
|
- `"BIC"` - Bayesian Information Criterion
|
|
558
623
|
- `boundary_knots`: Tuple of (min, max) for the spline basis
|
|
559
624
|
- `intercept`: Whether to include an intercept in the basis
|
|
560
|
-
- `penalty`: Whether to apply the penalty
|
|
625
|
+
- `penalty`: Whether or not to apply the penalty
|
|
561
626
|
|
|
562
627
|
**Methods:**
|
|
563
628
|
- `fit()`: Fit the spline model, returns coefficients
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
survival/__init__.py,sha256=GnlNEQ5WtMH1BtVycBOXD_TI0wZuqrEqGJYsXgjbhVI,115
|
|
2
|
+
survival/__init__.pyi,sha256=phbQd5RA8G_WqOUfceRiboKGkcVCLKybWxf1f1XDjZY,22470
|
|
3
|
+
survival/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
survival/survival.cpython-314-darwin.so,sha256=MYUvWtD6kJw-VvN5bQi9vKMgHKFtqOjh-eKsYpNc0WY,7351720
|
|
5
|
+
survival-1.1.26.dist-info/METADATA,sha256=liEZp_lfcqT_p10XTXBMblAmh-QXxnXKltTh0K5uR3w,22502
|
|
6
|
+
survival-1.1.26.dist-info/WHEEL,sha256=jyP0hJCe-fSX_gEscesIqqW7KerDJw7iyldGx-__w10,107
|
|
7
|
+
survival-1.1.26.dist-info/licenses/LICENSE,sha256=hS2BuXZUcQTPPxaojumqQeGtQjachYGOChZXBWbQQ7E,1070
|
|
8
|
+
survival-1.1.26.dist-info/RECORD,,
|
survival-1.1.5.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
survival-1.1.5.dist-info/METADATA,sha256=gHFqOT-FandBIsN_F4jNoXbAgQI2xmoUlKWHpu9OvR0,19768
|
|
2
|
-
survival-1.1.5.dist-info/WHEEL,sha256=0p9RWqZ1tTIS4XVGVX-OqQSPs2Wp470cV_pQ0zUt98A,107
|
|
3
|
-
survival-1.1.5.dist-info/licenses/LICENSE,sha256=hS2BuXZUcQTPPxaojumqQeGtQjachYGOChZXBWbQQ7E,1070
|
|
4
|
-
survival/__init__.py,sha256=GnlNEQ5WtMH1BtVycBOXD_TI0wZuqrEqGJYsXgjbhVI,115
|
|
5
|
-
survival/__init__.pyi,sha256=phbQd5RA8G_WqOUfceRiboKGkcVCLKybWxf1f1XDjZY,22470
|
|
6
|
-
survival/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
survival/survival.cpython-314-darwin.so,sha256=jpvdBaEvqp2vehcnKOUxkNJRO0yi-gNQlWvp7LvJE4Q,2862044
|
|
8
|
-
survival-1.1.5.dist-info/RECORD,,
|
|
File without changes
|