Metadata-Version: 2.4
Name: pystatar
Version: 0.4.2
Summary: [DEPRECATED] PyStataR has been superseded by StatsPAI (pip install statspai). All functionality has been migrated and extended; see https://github.com/brycewang-stanford/StatsPAI/blob/main/MIGRATION.md for the API mapping. This final release exists only to notify users of the migration.
Author-email: Bryce Wang <brycew6m@stanford.edu>
Maintainer-email: Bryce Wang <brycew6m@stanford.edu>
License-Expression: MIT
Project-URL: Homepage, https://github.com/brycewang-stanford/PyStataR
Project-URL: Repository, https://github.com/brycewang-stanford/PyStataR
Project-URL: Documentation, https://github.com/brycewang-stanford/PyStataR/docs
Project-URL: Bug Tracker, https://github.com/brycewang-stanford/PyStataR/issues
Keywords: stata,pandas,econometrics,statistics,data-analysis,tabulate,egen,winsor,cross-tabulation,pyegen,pywinsor2,pdtab,data-manipulation,winsorizing,frequency-analysis,outreg,pyoutreg,regression-tables,outreg2,model-output,research-tools
Classifier: Development Status :: 7 - Inactive
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: pyegen>=0.2.0
Requires-Dist: pywinsor2>=0.4.0
Requires-Dist: pdtab>=0.1.0
Requires-Dist: pyoutreg>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: pandoc; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest>=6.0; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Dynamic: license-file

# PyStataR

[![PyPI Version](https://img.shields.io/pypi/v/pystatar)](https://pypi.org/project/pystatar/)
[![Python Version](https://img.shields.io/pypi/pyversions/pystatar)](https://pypi.org/project/pystatar/)
[![License](https://img.shields.io/pypi/l/pystatar)](https://github.com/brycewang-stanford/PyStataR/blob/main/LICENSE)
[![Status](https://img.shields.io/badge/status-deprecated-red)](https://github.com/brycewang-stanford/StatsPAI)

🇬🇧 English · [🇨🇳 中文](README.zh-CN.md)

---

## ⚠️ DEPRECATED — Superseded by StatsPAI (2026-04-14)

**PyStataR is no longer maintained.** All functionality has been migrated to the new package **[StatsPAI](https://github.com/brycewang-stanford/StatsPAI)**, which also extends its scope to a complete causal-inference and econometrics toolkit — **390+ functions** covering classical econometrics, modern ML-based causal inference (DID, RDD, IV, DML, Causal Forest, Meta-Learners, TMLE, Neural Causal, Causal Discovery, Policy Learning, and more), plus publication-ready Excel / Word / LaTeX output and LLM-friendly workflows.

### Migrate in 3 steps

```bash
pip install statspai
```

```python
# Old (PyStataR)
from pystatar import pyegen, pywinsor2, pdtab, pyoutreg
pyegen.rowmean(df, ['x1', 'x2'])
pywinsor2.winsor2(df, ['wage'], cuts=(1, 99))
pdtab.tab2(df, 'x', 'y')
pyoutreg.outreg(model, 'out.xlsx')

# New (StatsPAI)
import statspai as sp
sp.rowmean(df, ['x1', 'x2'])
sp.winsor(df, ['wage'], cuts=(1, 99))
sp.tab(df, 'x', 'y')
sp.outreg2(model, filename='out.xlsx')
```

**Full API mapping**: see [MIGRATION.md](MIGRATION.md) in this repository or the identical copy inside [StatsPAI](https://github.com/brycewang-stanford/StatsPAI/blob/main/MIGRATION.md).

### Promises to existing users

- ✅ **PyPI package preserved forever** — `pip install pystatar` continues to work; existing versions will never be removed from PyPI.
- ✅ **GitHub repo preserved** — this repository will be archived (read-only) but never deleted; all Issues, Stars, and citations remain intact.
- ❌ **No new features or bug fixes** — please migrate to StatsPAI for ongoing updates.
- ❌ **Issues are frozen** — new questions should be opened at [StatsPAI/issues](https://github.com/brycewang-stanford/StatsPAI/issues).

### Why deprecated

PyStataR began as a Stata-to-Python bridge for the four most-used academic commands (`egen`, `winsor2`, `tabulate`, `outreg2`). Over time, the bigger vision became clear: build a **Python-native, AI-era causal-inference toolbox** rather than a Stata emulator. That package is **StatsPAI**. Running two packages in parallel only confuses users and doubles maintenance — so PyStataR's mission is being merged into StatsPAI, which does everything PyStataR did, and much more.

— Bryce Wang, 2026-04-14

---

## Historical overview (for reference)

PyStataR was a unified interface to four mature Stata-equivalent PyPI packages:

| Submodule | Stata equivalent | Purpose |
|---|---|---|
| **pyegen** | `egen` | Extended data generation: ranks, row statistics, group operations |
| **pywinsor2** | `winsor2` | Winsorizing / trimming at percentile or IQR cutoffs |
| **pdtab** | `tabulate` | One- and two-way cross-tabulation with statistical tests |
| **pyoutreg** | `outreg2` | Publication-quality regression tables exported to Excel / Word |

All four are fully covered — and substantially extended — in StatsPAI under the unified `sp.*` namespace.

### Final version

- **v0.4.1** — adds the DeprecationWarning and migration notice.
- **v0.4.0** — last feature release, integrated `pyoutreg`.

### Citation

If you used PyStataR in a publication, you may still cite the original repository; its GitHub URL and release history will remain available indefinitely. For new work, please cite **StatsPAI** instead.

---

## License

MIT — see [LICENSE](LICENSE).
