Metadata-Version: 2.5
Name: linccc
Version: 0.1.0
Summary: Lin's Concordance Correlation Coefficient (CCC) for Python
Project-URL: Homepage, https://github.com/OC-Moore/linccc
Project-URL: Issues, https://github.com/OC-Moore/linccc/issues
Author-email: Opal Moore <moore.41664@outlook.com>
License: MIT License
        
        Copyright (c) 2026 Opal Moore
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: CCC,Lin,agreement,concordance,correlation,statistics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Requires-Dist: numpy>=1.20
Provides-Extra: test
Requires-Dist: pandas>=1.3; extra == 'test'
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# linccc

Lin's Concordance Correlation Coefficient (CCC) for Python.

CCC (Lin, 1989) measures agreement between two sets of paired
measurements — for example, two instruments, raters, or methods
measuring the same thing. It combines precision (Pearson correlation)
and accuracy (deviation from the 45-degree line of perfect agreement)
into a single statistic ranging from -1 to 1.

> **Not to be confused with:** [`ccc-coef`](https://pypi.org/project/ccc-coef/)
> on PyPI, which implements the *Clustermatch Correlation Coefficient* —
> an unrelated statistic that happens to share the same acronym. This
> package implements Lin's original concordance correlation coefficient,
> the standard measure of agreement/reproducibility used in R's
> `epiR::epi.ccc()` and `DescTools::CCC()`.

## Installation

```bash
pip install linccc
```

## Usage

```python
from linccc import concordance_correlation_coefficient

x = [1, 2, 3, 4, 5]
y = [1.1, 1.9, 3.2, 3.9, 5.05]

result = concordance_correlation_coefficient(x, y)
print(result.ccc)         # 0.996...
print(result.pearson_r)   # Pearson correlation
print(result.mean_diff)   # mean(x) - mean(y)

# also unpacks like a plain tuple
ccc, r, diff = concordance_correlation_coefficient(x, y)
```

NaNs are dropped pairwise: if either `x[i]` or `y[i]` is `NaN`, that
pair is excluded from both arrays before computing the statistic.

## Validation

Results are cross-validated against R's `epiR::epi.ccc()` on identical
data (see `tests/test_core.py`, `test_matches_r_epiR_reference`).

## Citation

If you use this package in published work, please cite:

> Lin, L. I. (1989). A concordance correlation coefficient to evaluate
> reproducibility. *Biometrics*, 45(1), 255-268.

See `CITATION.cff` for citing this software package itself.

## License

MIT — see `LICENSE`.
