Metadata-Version: 2.4
Name: lme_python
Version: 0.2.2
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Dist: polars>=1.0.0
Requires-Dist: maturin>=1.8,<2.0 ; extra == 'dev'
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pip-audit>=2.6 ; extra == 'dev'
Requires-Dist: pandas>=2.0 ; extra == 'dev'
Requires-Dist: pyarrow>=14.0 ; extra == 'dev'
Provides-Extra: dev
Summary: Rust port of R's lme4: linear mixed-effects models
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/x4g4p3x/lme-rs/blob/master/CHANGELOG.md
Project-URL: Documentation, https://github.com/x4g4p3x/lme-rs/blob/master/python/PYTHON_GUIDE.md
Project-URL: Homepage, https://github.com/x4g4p3x/lme-rs
Project-URL: Issues, https://github.com/x4g4p3x/lme-rs/issues
Project-URL: Repository, https://github.com/x4g4p3x/lme-rs

# lme-python

Native Python bindings for [`lme-rs`](https://github.com/x4g4p3x/lme-rs), a Rust implementation of linear, generalized linear, and nonlinear mixed-effects models modeled after R's `lme4` workflow.

## Install

```bash
pip install lme-python
```

Published wheels are available for CPython 3.10 on Windows, macOS, and Linux; CI also builds and tests wheels from source on Python 3.10–3.13. The package imports as `lme_python` and uses Polars DataFrames.

## Quick start

```python
import lme_python
import polars as pl

data = pl.DataFrame(
    {
        "y": [10.0, 12.0, 13.0, 15.0, 9.0, 11.0, 14.0, 17.0, 8.0, 10.0, 12.0, 14.0],
        "x": [0.0, 1.0, 2.0, 3.0] * 3,
        "group": ["a"] * 4 + ["b"] * 4 + ["c"] * 4,
    }
)

fit = lme_python.lmer("y ~ x + (1 | group)", data=data, reml=True)
print(fit.summary())
print(fit.predict(data))
```

The bindings also expose GLMMs (`glmer`), nonlinear mixed models (`nlmer`), prediction and simulation, profile and bootstrap confidence intervals, grouped cross-validation, contrasts, Type I/II/III ANOVA, and LMM estimated marginal means with reference-grid pairwise comparisons.

## Documentation

- [Python guide](https://github.com/x4g4p3x/lme-rs/blob/master/python/PYTHON_GUIDE.md)
- [Rust and Python workflow guide](https://github.com/x4g4p3x/lme-rs/blob/master/GUIDE.md)
- [Supported workflows and limitations](https://github.com/x4g4p3x/lme-rs/blob/master/USABILITY.md)
- [Numerical comparisons](https://github.com/x4g4p3x/lme-rs/blob/master/comparisons/COMPARISONS.md)
- [Release history](https://github.com/x4g4p3x/lme-rs/blob/master/CHANGELOG.md)

## Development

Contributor setup, validation commands, and release policy live in the repository's [CONTRIBUTING.md](https://github.com/x4g4p3x/lme-rs/blob/master/CONTRIBUTING.md). The automated `task consumer:smoke` gate builds an isolated wheel, installs it into a clean environment, and runs the portable examples against that installed artifact.
License-File: THIRD_PARTY_NOTICES.md
License-File: RELINKING.md
License-File: Apache-2.0.txt
License-File: BSD-3-Clause-OpenBLAS.txt
License-File: GPL-2.0-or-later.txt
License-File: LGPL-2.1-only.txt
License-File: Intel-Simplified-Software-License.txt
