Metadata-Version: 2.4
Name: seminrExtras
Version: 0.1.0
Summary: Python port of the seminrExtras R package: supplementary PLS-SEM evaluation and validation tools (CVPAT, PCM, cIPMA, COA, NCA, CTA-PLS, FIMIX-PLS, PLS-POS, congruence)
Project-URL: Homepage, https://github.com/sem-in-r/seminrExtras-py
Project-URL: Repository, https://github.com/sem-in-r/seminrExtras-py
Project-URL: Issues, https://github.com/sem-in-r/seminrExtras-py/issues
Author: Soumya Ray
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: cvpat,fimix,ipma,nca,partial-least-squares,pls-sem,segmentation,sem,seminr,statistics,structural-equation-modeling
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: seminr>=0.2.1
Provides-Extra: pandas
Requires-Dist: pandas>=2.0; extra == 'pandas'
Provides-Extra: plot
Requires-Dist: matplotlib>=3.8; extra == 'plot'
Description-Content-Type: text/markdown

# seminrExtras (Python)

Python port of the [seminrExtras](https://github.com/sem-in-r/seminrExtras) R
package: supplementary tools for evaluating and validating PLS-SEM (partial
least squares structural equation) models, built on the
[seminr](https://pypi.org/project/seminr/) estimation engine.

Every feature is validated for numerical parity against the R package on
R-generated golden fixtures (1e-5 default tolerance; injected R random streams
for resampling-based features).

## Installation

```bash
pip install seminrExtras            # core
pip install "seminrExtras[plot]"    # + matplotlib for the plot layer
pip install "seminrExtras[pandas]"  # + pandas-friendly input
```

Requires Python >= 3.11 and `seminr >= 0.2.1` (installed automatically).

## Features

Mirroring the R package, evaluated over an already-estimated `seminr` model:

| Feature | Functions |
| --- | --- |
| Cross-Validated Predictive Ability Test (CVPAT) | `assess_cvpat`, `assess_cvpat_compare` |
| Predictive Contribution of the Mediator (PCM) | `assess_pcm` |
| (Combined) Importance-Performance Map Analysis | `assess_ipma`, `assess_cipma` |
| Composite Overfit Analysis (COA) | `assess_coa`, `predictive_deviance`, `deviance_tree`, `unstable_params`, `group_rules`, `competes` |
| Necessary Condition Analysis (NCA) | `assess_nca`, `assess_nca_esse` |
| Confirmatory Tetrad Analysis (CTA-PLS) | `assess_cta` |
| FIMIX-PLS (latent-class segmentation) | `assess_fimix`, `assess_fimix_compare` |
| PLS-POS (prediction-oriented segmentation) | `assess_pos`, `assess_pos_compare`, `pos_segments` |
| Congruence testing | `congruence_test` |

## Usage

Specify and estimate a model with `seminr`, then evaluate it with
`seminrExtras`:

```python
from seminrExtras import assess_cvpat

result = assess_cvpat(model, nboot=200, seed=123)
print(result)              # readable table (R print parity)
result.summarize()         # detailed summary

# Plots (requires the `plot` extra):
from seminrExtras.plotting import plot
fig = plot(result)
```

Result objects are frozen dataclasses with a readable `__str__`, a
`summarize()` method, and — via `seminrExtras.plotting` — matplotlib plots that
mirror the R package's `plot` methods.

## Development

```bash
uv sync                # install (dev group included)
uv run pytest          # tests
uv run ruff check .    # lint
uv run ruff format .   # format
uv run mypy src        # type-check (strict)
```

## License

GPL-3.0-only, like the R package it ports.
