Skip to main content

compare_concordance

This Python package implements a statistical test for the comparison of correlated right-censored concordance indices. The code is derived entirely from the GPLv3-licensed R package compareC. Accordingly, this package is also licensed under GPLv3. If you use it in published work, you should cite the original authors' paper (see below).

Installation

First, build the C library:

$ python3 setup.py build_ext

Then, install using Pip:

$ pip3 install .

This has been tested on 64-bit Linux with GCC version 7.5.0 and Python 3.6. If the installation step fails, it may be because your system names the .so file differently than expected.

Usage

from compare_concordance import compare_concordance

scores_1 = model1.predict(x)
scores_2 = model2.predict(x)

concordance_1, concordance2, difference, zscore, pvalue = compare_concordance(
    y['time'],
    y['status'],
    scores_1,
    scores_2
)

Citation

Kang L, Chen W, Petrick NA and Gallas BD (2015). "Comparing two correlated C indices with right-censored survival outcome: a one-shot nonparametric approach." Statistics in Medicine, 34(4), pp. 685-703. http://dx.doi.org/10.1002/sim.6370.

Bibtex

@Article{,
  title = {Comparing two correlated C indices with right-censored
    survival outcome: a one-shot nonparametric approach},
  author = {Le Kang and Weijie Chen and Nicholas A. Petrick and
    Brandon D. Gallas},
  year = {2015},
  volume = {34},
  number = {4},
  pages = {685-703},
  journal = {Statistics in Medicine},
  url = {http://dx.doi.org/10.1002/sim.6370},
}

Metadata

Release files for compare-concordance 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compare-concordance 0.0.2
File Size Uploaded
compare_concordance-0.0.2.tar.gz 43.3 kB Details

Release files / compare_concordance-0.0.2.tar.gz

Download URL compare_concordance-0.0.2.tar.gz
Size 43.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c4b71ab1a76dfa514cdf6c65ec03ab3fa7549bc39aa34e8a9b190a55c3fb9c82
BLAKE2b-256 checksum
How to use checksums
7fe75f2a7a171f68c38c65cd38ffc19c0564766c5a2fe67cf07a273710ccf332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page