Overview
This Library provides a comprehensive framework for testing the fundamental assumptions of linear regression models. It implements automated diagnostic tools to check whether your regression model meets the statistical requirements necessary for valid inference and prediction.

📌 Purpose
Linear regression relies on several statistical assumptions (linearity, normality, homoscedasticity, independence, etc.). Many students and early researchers struggle with:
- Knowing which tests to apply
- Guide for interpreting statistical results
- Presenting clear diagnostics and plots
AssumpHelper addresses these challenges by offering a structured, reusable workflow that checks regression assumptions and explains the results in a clear and organized way.
✨ Features
- Automated linear regression assumption testing
- Built‑in statistical tests with interpretation guides
- Visualization support for diagnostics
- Beginner‑friendly design with clear outputs
- Modular structure for easy extension
- Suitable for academic, research, and learning purposes
Supported Assumption Checks
- Linearity (e.g., Ramsey RESET Test)
- Homoscedasticity (Breusch–Pagan Test)
- Normality of Residuals (Shapiro–Wilk Test)
- Independence of Errors (Durbin–Watson Test)
📂 Project Structure
AssumpHelper/
│
├── assumphelper/
│ ├── __init__.py
│ ├── check.py
│ ├── exceptions.py
│ ├── hypothesis.py
│ ├── utilities.py
│ │
│ ├── linearity.py
│ ├── normality.py
│ ├── homoscedasticity.py
│ ├── independence.py
│ │
│ ├── linplot_interpretation_guide.txt
│ ├── normplot_interpretation_guide.txt
│ ├── homplot_interpretation_guide.txt
│ └── indepplot_interpretation_guide.txt
│
├── DOCS/
│ ├── examples/
│ │ └── examples.ipynb
│ │
│ └── tests/
│ └── test_assumphelper_assert_errors.ipynb
│
├── README.md
├── requirements.txt
├── setup.py
└── .gitignore
⚙️ Installation
Install the required packages using pip:
pip install assumphelper
🚀 Sample Usage
import numpy as np
from sklearn.linear_model import LinearRegression
import assumphelper as ah
np.random.seed(42)
# Generate clean linear data
n = 100
X = np.linspace(1, 50, n).reshape(-1, 1)
y = 2.5 * X.ravel() + 15 + np.random.normal(0, 2, n)
#Checking Linearity
model = LinearRegression()
linearity = ah.Linearity(model, X, y)
linearity.fit()
linearity.test()
RESET Test for Linearity F-statistic: 5.2888 p-value: 0.0710
Interpretation:
If alpha = 0.05 and p-value > 0.05: Assumption of Linearity is NOT VIOLATED.
linearity.plot()
Linearity Plot (Residuals vs Fitted Values)
If the plot shows a random scatter of points around the horizontal axis with no clear curve, the relationship between the predictors and the outcome is linear.
The assumption of linearity is NOT VIOLATED.
If the plot shows a curve or systematic pattern in the scatter of points, the relationship between the predictors and the outcome is not linear.
The assumption of linearity is VIOLATED.
Always double check with the RESET test. (<Figure size 800x600 with 1 Axes>, <Axes: title={'center': 'Residuals vs Fitted Plot'}, xlabel='Fitted Values', ylabel='Residuals'>)
📊 Outputs
AssumpHelper provides:
- Test statistics and their p‑values
- Plain‑language interpretation (Pass / Violation)
- Diagnostic plots (residuals vs fitted, Q‑Q plots, etc.)
- Structured interpretation guides for reports and presentations
🎓 Intended Users
- Students learning linear regression
- Beginners who want clarity without losing rigor
🧠 Inspiration
This project is inspired by common regression workflows in:
- Statistics & Econometrics courses
- Python libraries such as
statsmodelsandscikit‑learn - The need for simpler interpretation of assumption tests
🔧 Requirements
- Python 3.7+
- numpy
- pandas
- scipy
- statsmodels
- matplotlib
- seaborn
(See requirements.txt for the full list.)
📜 License
This project is released under the MIT License.
👤 Author
Developers
[Kirsten Roise G. Moog]
Our distinguish Leader & Inceptionist & Structural Design
[Rodel P. Badilla]
Our Assistant Leader
Leaders Roles
- Designed clean separation of concerns
- Implementing codes engine
- Created visualization tools
- Enhanced plotting capabilities
[Hannah Dennisse Y. Aque]
[James Walte C. Prollo]
[Zell Caamino]
Roles
Back (support)
- Built comprehensive test suite
- Wrote user documentation.
- Quality assurance
Note: This diagnostic framework helps ensure the validity of your regression analysis by systematically checking fundamental statistical assumptions. Regular use of these tools will improve the reliability and interpretability of your regression models.
Metadata
Release files for assumphelper 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| assumphelper-0.2.0.tar.gz | 9.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assumphelper-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.1 kB
Release files / assumphelper-0.2.0.tar.gz
| Download URL | assumphelper-0.2.0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f5585b269b31acb891d737fd49a398f321ffc9fbc09f1b2ddf48f24c5d75953
|
|
BLAKE2b-256 checksum How to use checksums |
02c228ad81229925b5f77ce54b0cc30a795f2a2847dcab6e713803b053ce4829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / assumphelper-0.2.0-py3-none-any.whl
| Download URL | assumphelper-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de4a31fc10f42091dd6ff84cb71303e2128bb0f34e78ce8c1fb926dd666f7203
|
|
BLAKE2b-256 checksum How to use checksums |
cdff230688c421bb3360efaed99e8b2b76aba9450e9d7a229980fdf11adfd0f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for assumphelper 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.