Calculator Inputs
Example Data Table
This sample shows one response (Y) and three predictors (X1–X3).
| Y | X1 | X2 | X3 |
|---|---|---|---|
| 12 | 1 | 4 | 2 |
| 15 | 2 | 3 | 3 |
| 14 | 3 | 4 | 4 |
| 18 | 4 | 2 | 5 |
| 20 | 5 | 1 | 6 |
| 22 | 6 | 2 | 7 |
| 25 | 7 | 3 | 8 |
| 28 | 8 | 4 | 9 |
Formula Used
- OLS coefficients:
β = (XᵀX)⁻¹ Xᵀy - Predictions:
ŷ = Xβ, Residuals:e = y − ŷ - SSE:
Σ eᵢ², MSE:SSE / (n − k), RMSE:√MSE - R²:
1 − SSE/SST, whereSST = Σ(yᵢ − ȳ)² - Leverage:
hᵢ = xᵢᵀ (XᵀX)⁻¹ xᵢ - Std. residual:
rᵢ = eᵢ / √(MSE(1−hᵢ)) - Studentized residual:
tᵢ = eᵢ / √(MSEᵢ(1−hᵢ)) - Cook’s distance:
Dᵢ = (eᵢ²/(k·MSE)) · (hᵢ/(1−hᵢ)²) - Durbin–Watson:
Σ(eᵢ−eᵢ₋₁)² / Σ eᵢ² - Jarque–Bera:
JB = (n/6)(S² + (K−3)²/4) - Breusch–Pagan:
BP = n·R²from regressingeᵢ²on predictors - VIF:
VIFⱼ = 1/(1−Rⱼ²)from regressing predictorxⱼon other predictors
How to Use This Calculator
- Paste your dataset into the box, one row per observation.
- Select delimiter or keep auto detection for quick parsing.
- Tick “First row is header” if your data includes names.
- Enter the response column (name or 1-based index).
- Optionally list predictors; otherwise all other columns are used.
- Press Submit to view diagnostics and per-row influence metrics.
- Use CSV/PDF buttons to export results for reporting.
Why diagnostics matter in fitted models
Regression diagnostics protect decisions made from fitted equations. Small data issues can produce confident but wrong coefficients. This tool summarizes fit using R², adjusted R², RMSE, and MAE, so you can compare models on accuracy and complexity. A higher adjusted R² indicates useful predictors beyond chance. RMSE stays in the response unit, making error size easy to interpret for forecasting, budgeting, or scientific measurement work. It supports fair comparisons across datasets today.
Reading residual patterns with practical thresholds
Residual behavior reveals whether the linear structure is adequate. In the residuals versus fitted chart, a random cloud around zero supports linearity. Curves or funnels suggest missing terms or non‑constant variance. Standardized residuals scale errors by model uncertainty, so values beyond ±2 deserve review and beyond ±3 are often extreme. Checking clusters by fitted range helps detect regime changes and segment effects quickly. Use repeated patterns to propose terms or transformations early.
Identifying leverage and influential observations
Influence diagnostics explain which rows can steer the fitted line. Leverage hᵢ measures how unusual a row’s predictor pattern is, relative to the rest. A common screening rule is hᵢ > 2k/n, where k is the parameter count. Cook’s distance combines leverage and residual size; values above 4/n flag candidates for sensitivity checks. Studentized residuals help separate outliers from merely high‑leverage points. Re-fit without flagged rows to confirm conclusions remain stable overall.
Testing normality and constant variance
Distribution tests quantify assumptions behind t and F statistics. Jarque–Bera uses residual skewness and kurtosis to test normality; low p‑values warn that confidence intervals may be optimistic. Breusch–Pagan regresses squared residuals on predictors to detect heteroscedasticity; significant results suggest using transformations, weighted fitting, or robust errors. Durbin–Watson approximates serial correlation, where values near 2 suggest independence and smaller values suggest positive autocorrelation. Combine these signals with domain knowledge before changing specifications materially.
Improving model stability and reporting outputs
Model stability depends on predictor relationships. Variance Inflation Factor (VIF) measures multicollinearity by regressing each predictor on the others, with VIF = 1/(1−R²). Values above 5 indicate moderate collinearity and above 10 indicate strong collinearity that can inflate standard errors. Use this report’s coefficient table, p‑values, and VIF together to simplify features, center variables, or redesign data collection for clarity. When VIF is high, interpret signs cautiously and prioritize simpler models first.
FAQs
1) What data format does the tool accept?
Paste CSV-like rows with a consistent delimiter. Include a header row if you want to select columns by name. Non-numeric cells are skipped, so clean text labels before running diagnostics.
2) Why include an intercept?
An intercept lets the model fit a baseline level when predictors are zero. Many goodness-of-fit measures and the leverage rule use k, so changing the intercept changes thresholds and interpretation.
3) What does Cook’s D mean here?
Cook’s D estimates how much the fitted coefficients would shift if a row were removed. Values above 4/n are a practical screen, but you should also review context, measurement errors, and whether the point is legitimately extreme.
4) How should I read the residual plot?
Look for random scatter around zero with similar spread across fitted values. Curves suggest missing terms, while a widening spread suggests heteroscedasticity. Use the standardized residual scale to compare across datasets.
5) When is VIF too high?
VIF near 1 indicates low collinearity. Values above 5 often signal moderate overlap and above 10 can make coefficients unstable. Consider dropping redundant predictors, combining features, or collecting more varied observations.
6) What do the normality and BP p-values affect?
They assess whether residual distribution and variance assumptions are plausible. If p-values are small, standard errors and p-values may be unreliable. Try transformations, robust errors, or weighted fitting, and re-check diagnostics after changes.