Metadata-Version: 2.4
Name: statstudio
Version: 0.1.2
Summary: A desktop environment for statistical analysis, visualization, and design of experiments
Author: P Aryal
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/paryal01-ai/StatStudio
Project-URL: Repository, https://github.com/paryal01-ai/StatStudio
Project-URL: Issues, https://github.com/paryal01-ai/StatStudio/issues
Project-URL: Changelog, https://github.com/paryal01-ai/StatStudio/releases
Keywords: statistics,data analysis,design of experiments,statistical modeling,desktop,pyside6
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: MacOS X
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
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
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6>=6.5
Requires-Dist: pandas>=2.0
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.11
Requires-Dist: statsmodels>=0.14
Requires-Dist: matplotlib>=3.8
Requires-Dist: plotly>=6.0
Requires-Dist: pyodbc>=5.0
Requires-Dist: openpyxl>=3.1
Requires-Dist: pyarrow>=15.0
Requires-Dist: scikit-learn>=1.3
Requires-Dist: keyring>=24.0
Provides-Extra: excel
Requires-Dist: xlrd>=2.0; extra == "excel"
Provides-Extra: spss
Requires-Dist: pyreadstat>=1.2; extra == "spss"
Provides-Extra: ml
Requires-Dist: xgboost>=2.0; extra == "ml"
Provides-Extra: bayesian
Requires-Dist: pymc>=5.10; extra == "bayesian"
Requires-Dist: arviz>=0.17; extra == "bayesian"
Provides-Extra: dev
Requires-Dist: pytest>=7.4; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: pyinstaller>=6.0; extra == "dev"
Dynamic: license-file

# StatStudio

StatStudio is a desktop environment for statistical analysis, visualization,
and design of experiments, built with Python and PySide6.

## Install

StatStudio requires Python 3.11 or newer. Install the package from PyPI:

```bash
python -m pip install --upgrade pip
python -m pip install statstudio
```

Launch the desktop app:

```bash
statstudio-gui
```

`statstudio` also launches the desktop app. If neither command is on your
`PATH`, use the module fallback:

```bash
python -m statstudio
```

Install optional format and modeling support as needed:

```bash
python -m pip install "statstudio[excel]"     # legacy .xls via xlrd
python -m pip install "statstudio[spss]"      # SPSS .sav via pyreadstat
python -m pip install "statstudio[ml]"        # XGBoost models
python -m pip install "statstudio[bayesian]"  # PyMC/ArviZ analysis
```

For a development checkout, see [Run from source](#run-from-source).

## Features

- Multiple data tables per project with editable cells, column metadata, modeling
  types, units, notes, formulas, filters, exclusions, multi-column sorting,
  missing-value handling, and undo/redo
- Import from CSV/TSV, Excel, Parquet, JSON, clipboard, Stata, SAS, and ODBC
  (DSN or driver-based connection strings, SQL preview/import, saved profiles)
- Export tables to CSV, Excel, Parquet, and JSON; save `.sst` projects and
  `.stbl` table files
- Data preparation: merge/join, append, split, stack/unstack, transpose, subset,
  recode, replace missing values, standardize, Box-Cox transform, rank, bin,
  text-to-columns, and formula columns
- Home dashboard, searchable Analysis Hub, recent projects/commands, favorites,
  light/dark themes, quick toolbars, and a command palette
- Command palette, sample data, linked table scripts, and grouped summaries
- Descriptive statistics, frequency tables, grouped summaries, distribution
  fitting, distribution identification, distribution summaries, tolerance
  intervals, correlation/covariance, and normality tests
- t tests, one-way/two-way/repeated-measures ANOVA, Kruskal-Wallis, post-hoc
  comparisons, Mann-Whitney, Wilcoxon signed-rank, one-sample Wilcoxon, sign
  test, Mood's median test, Friedman test, runs test, equivalence tests,
  contingency/chi-square/Fisher tests, and proportion tests
- Simple, multiple, robust-standard-error (HC3), polynomial, stepwise, logistic,
  GLM, mixed, and GEE regression with diagnostics, prediction profilers, and
  multi-response optimization
- PCA, factor analysis, k-means and hierarchical clustering, discriminant
  analysis (LDA/QDA), canonical correlation, and MANOVA
- Predictive modeling with CART, Random Forest, Neural Network, SVM, Naive
  Bayes, XGBoost, and Auto Model; holdout/cross-validation, performance metrics,
  feature importance, confusion matrices, and ROC plots
- Bayesian linear/logistic regression, two-sample comparisons, and one-way ANOVA
  with MCMC diagnostics and posterior/predictive plots (optional PyMC/ArviZ)
- Time series summaries, ACF/PACF, stationarity tests, classical and STL
  decomposition, ARIMA, exponential smoothing, and forecasts
- Kaplan-Meier survival, log-rank tests, Cox proportional hazards, competing
  risks/cumulative incidence, Weibull/AFT reliability, interval-censored data,
  and zero-failure reliability
- Control charts, process capability, Pareto charts, process screening, Gage R&R
  (crossed/nested/expanded), attribute agreement, and power/sample-size tools
- Design of experiments: custom optimal designs with continuous, categorical,
  and blocking factors; D/A/I criteria; linear constraints; preview/evaluation;
  full and fractional factorials; Plackett-Burman screening; central composite;
  Gaussian-process Bayesian optimization for recommending the next run;
  Box-Behnken; and mixture designs
- DOE analysis with main effects, interactions, quadratic response models,
  Pareto plots, main-effect/interaction plots, contour and surface plots,
  design diagnostics, prediction, response simulation, design modifications,
  profilers, and multi-response optimization
- Graph Builder with linked selection, brushing, hover, per-report filters, and
  column switching; histogram, density, box, violin, strip, variability, dot,
  bar, pie, scatter, bubble, 3D, line, area, heatmap, correlation heatmap,
  scatterplot matrix, parallel coordinates, contour, surface, mosaic, and Pareto
  plots
- Report Composer, saved analyses, re-runnable reports, interactive profilers,
  and HTML, PDF, Word, interactive HTML, and image export
- Embedded Python console, generated analysis code, scripts panel, analysis
  journal, headless CLI, automation API, and analysis/plot plugins

## Python libraries

StatStudio requires Python 3.11 or newer. Core runtime and analysis libraries:

- PySide6 for the desktop UI
- NumPy and pandas for data handling
- SciPy, statsmodels, and scikit-learn for statistical and predictive modeling
- Matplotlib and Plotly for static and interactive graphics
- openpyxl, pyarrow, pyodbc, and keyring for Excel, Parquet, database, and
  credential support

Optional packages enable additional formats and methods:

- `xlrd` for legacy `.xls` files
- `pyreadstat` for SPSS `.sav` files
- `xgboost` for XGBoost predictive models
- `pymc` and `arviz` for Bayesian analysis

Development and packaging use `pytest`, `ruff`, and PyInstaller; the package
builds with `setuptools`.

## Help

Press `F1` or choose **Help > StatStudio Help...** to open the searchable
feature reference. Every topic includes a **Before you begin** checklist,
step-by-step instructions with exact menu and dialog labels, a settings guide,
expected results, troubleshooting, and next steps. Search Help for task-based
walkthroughs such as comparing groups, fitting a model, building a control
chart, designing an experiment, and scripting an analysis.

Most analysis, data, graph, DOE, and report windows also have a **Help** button
and `F1` shortcut that opens the matching topic directly. In the Python console,
use `print(result.summary)` for a text result or `sdk.show(result)` to open an
analysis result as a report. The help covers menu
commands, analyses, DOE, graphs, reports, scripting, optional Python packages,
and known limitations. It is built into the app and works offline.

## Examples

The `examples/` directory contains CSV/STBL datasets, `.sst` projects, and Python
scripts for quality, predictive modeling, survival analysis, time series, PCA,
custom DOE, and Titanic random forest examples. Open the projects from **File >
Open Project**, or search **Help > StatStudio Help...** for the example guide.
From a source checkout, regenerate the assets with:

```bash
PYTHONPATH=src python examples/generate_examples.py
```

See `examples/README.md` and `examples/NOTICE.md` for details and attribution.

## Run from source

Clone the repository and install an editable development environment:

```bash
git clone https://github.com/paryal01-ai/StatStudio.git
cd StatStudio
python -m pip install -e ".[dev]"
python run.py
```

The editable install also provides `statstudio-gui`, `statstudio`, and
`python -m statstudio`.

## Optional data formats

The base install reads CSV/TSV, Parquet, JSON, Stata, SAS, and XLSX/XLSM files.
Two formats need optional packages:

```bash
python -m pip install "statstudio[excel]"   # legacy .xls support via xlrd
python -m pip install "statstudio[spss]"    # SPSS .sav support via pyreadstat
```

Other extras:

```bash
python -m pip install "statstudio[ml]"        # XGBoost predictive models
python -m pip install "statstudio[bayesian]"  # PyMC/ArviZ Bayesian analysis
python -m pip install "statstudio[dev]"       # pytest, ruff, and PyInstaller
```

When working from a source checkout, replace `"statstudio[...]"` with
`-e ".[...]"`, for example `python -m pip install -e ".[dev]"`.

## ODBC

StatStudio uses `pyodbc`. The operating system must have the appropriate ODBC
driver and/or DSN configured. On Linux, install unixODBC plus a database-specific
driver, then verify with `odbcinst -q -d` and the connection dialog inside
StatStudio. Passwords are stored only in the OS keyring when explicitly requested
and are never written to project files.

## Current limitations

- Optional features: `.xls`, `.sav`, Bayesian, and XGBoost require optional
  extras and are not part of the default install or CI.
- Data and performance: tables and analysis frames are held in memory; very large
  imports and analyses are limited by RAM. Dense plots and large reports may be
  slow, facet/multi-plot pages are truncated to 12, and interactive HTML files
  can be large.
- Table export: hidden columns are omitted; excluded rows are included in normal
  exports; plain exports do not preserve metadata, formulas, or scripts.
- Reports: saved reports store run-time results rather than immutable data
  snapshots and can become stale. Replayable analyses rerun live, while others
  fall back to static HTML. Report Composer combines existing reports and does
  not run analyses. Word export uses OOXML, not Microsoft Word layout.
- ODBC: requires a system ODBC driver/DSN and `pyodbc`; StatStudio does not bundle
  native database drivers or connectors.
- Packaging: the frozen app uses bundled Python, so extra packages may require
  rebuilding. Bundles are platform-specific and currently unsigned; frozen
  builds are not verified end-to-end on every platform.
- Statistical approximations: GEE QIC is reported only when statsmodels exposes
  it; Fleiss kappa is approximate; ETS/STL and random-walk forecast intervals
  use residual-based approximations; the fractional-factorial catalog is limited;
  optimal DOE uses a heuristic beyond 200,000 candidate combinations; SPC
  subgroup methods reject sizes outside 2-25; nonparametric tolerance intervals
  report the widest available interval when the requested confidence cannot be
  achieved; survival routines are hand-rolled and validated against closed-form
  and standard reference cases, and should be compared with validated
  third-party software when available.
- Missing data: most analyses use listwise deletion rather than multiple
  imputation. Statistical significance does not establish practical importance
  or causality.
- Bayesian analyses can be slow and depend on priors, parameterization, and
  convergence. Inspect diagnostics before interpreting results. Long analyses
  run in a background worker with a progress window; cancellation is
  cooperative, so a library call that is already sampling may need to finish.
- Bayesian optimization is a Gaussian-process sequential design aid. It requires
  observed runs, assumes a smooth response, searches within the specified factor
  ranges/levels, and does not guarantee a global optimum. Search bounds may be
  narrower than the observed training range; categorical level lists can be
  edited to exclude levels from the search.
- Custom-design multi-response optimization is unavailable; use the custom
  Prediction Profiler instead.
- Scope: StatStudio is not a drop-in replacement for dedicated commercial
  statistics suites. SEM, general nonlinear regression, advanced Graph Builder
  drag-drop/animation polish, and the broadest mixture/response-surface catalogs
  are not implemented.
- Scripting and plugins run arbitrary Python in the desktop process. Only run
  trusted code and install trusted extensions; the CLI exposes a subset of GUI
  functionality.

## License

StatStudio is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.

StatStudio is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the `LICENSE` file for the full license text.

Copyright (C) 2026 P Aryal.

Third-party example datasets remain subject to the separate notices in
`examples/NOTICE.md`; the GPL applies to the StatStudio source code.

## Tests

```bash
pytest
```
