UK-based online statistics and data analysis support for USA, UK, and international clients. No exams, no impersonation, no fabricated data.
Regression Tests and Models

Regression Assumptions: Tests, Diagnostics, Python, R, SPSS and Excel Guide

A verified 649-case regression assumptions audit covering functional form, residual normality, variance, independence, VIF, influence, and matched Python, R, SPSS, and Excel evidence.

Statistics guide Ethical learning support SPSS/R/Python/Excel friendly
H Regression Tests and Models - Regression Coefficients - R - Image - 01_regression_coefficients_with_confidence_intervals
Testing model conditions rather than checking boxes

Regression Assumptions: Tests, Diagnostics, Python, R, SPSS and Excel Guide

Regression Assumptions determine whether a fitted linear model gives a defensible description of the conditional mean and trustworthy uncertainty estimates. This worked audit evaluates functional form, residual distribution, variance stability, independence, multicollinearity, leverage, and influence for a 649-case model of G3.

649 complete cases6 predictorsR² 0.85063258 cases flagged by at least one influence rule

Regression Assumptions Model Overview

Regression Assumptions are the conditions under which an ordinary least squares model can be interpreted as an adequate linear description of the outcome and its conventional standard errors, confidence intervals, t tests, and F tests can be trusted. They are not one universal pass-or-fail checklist. Each assumption asks a different question, uses different evidence, and may require a different remedy. Regression Assumptions evidence should always be linked to the exact fitted specification.

What Regression Assumptions Are

The fitted equation predicts G3 from G1, G2, studytime, failures, absences, and age. The model can have a high R² while still violating functional-form, variance, or residual-distribution conditions. Regression Assumptions therefore evaluate the structure left behind after the mean equation is fitted rather than judging the model only from R² or the overall F statistic.

The most important conditions are an adequately specified conditional mean, independent errors, stable residual variance, acceptable residual behavior for the intended inference, manageable multicollinearity, and absence of cases that determine results disproportionately.

Why Regression Assumptions Must Be Checked Separately

A normal residual histogram does not prove constant variance. A Durbin-Watson value near 2 does not prove linearity. A VIF below 5 does not prove that no observation is influential. Each diagnostic targets a distinct feature of the model.

The current audit is deliberately mixed. Independence and collinearity are reasonably supported. Functional form, homoscedasticity, and residual normality are challenged. Influence diagnostics identify a limited but important group of cases. The correct conclusion is therefore not “all assumptions pass” or “the model is invalid,” but a condition-by-condition interpretation.

The Worked Regression Model

G3 = β₀ + β₁G1 + β₂G2 + β₃studytime + β₄failures + β₅absences + β₆age + ε

The model uses 649 complete observations and six predictors. R² is 0.8506322461601578, adjusted R² is 0.8492362858438975, RMSE is 1.2544090063688753, and the overall model is significant, F = 609.3527418021525, p < .001.

Linearity and Functional Form

Linearity means that the specified additive terms adequately represent the conditional mean. It does not mean that every raw scatterplot must be a perfect straight line. The question is whether systematic curvature or omitted combinations remain after all predictors are considered.

The Ramsey RESET Test gives F = 10.77405708716365, p = 0.0010852315202711362. This challenges the current functional form and suggests that nonlinear terms, interactions, transformations, or omitted structure may remain.

Homoscedasticity

Homoscedasticity means that conditional residual variance is approximately constant across fitted values and predictor profiles. It is not required for OLS coefficient estimates to be computed, but it is important for conventional model-based standard errors.

The Breusch-Pagan Test gives LM = 33.0541920131443, p = 1.0237048600284003 × 10−5. The White Test gives LM = 75.54743490382064, p = 1.7528560789176337 × 10−6. Both reject constant variance.

Residual Normality

Residual normality is mainly an inferential condition for exact small-sample tests and intervals. It is not required for the OLS line to minimize squared error. In large samples, coefficient estimates may remain useful despite non-normal residuals, but extreme tails can affect uncertainty and influence.

The Shapiro-Wilk Test gives W = 0.754697364131062, p = 6.244475451873078 × 10−30. The Jarque-Bera Test gives JB = 10152.729452009393, p approximately 0. The histogram and Q-Q plot show that this result is driven largely by strong tail departures and unusual low-outcome cases.

Independence of Errors

Independence means that one observation’s error is not systematically connected to another’s. This is primarily a study-design issue. The residual sequence and Durbin-Watson statistic can detect some order-related structure when row order has a meaningful sequence.

Durbin-Watson is 1.8609563415688704, reasonably close to 2. The evidence does not indicate strong first-order autocorrelation, although this does not prove independence under every possible clustering mechanism.

Multicollinearity

Multicollinearity concerns overlap among predictors. High overlap can inflate coefficient standard errors and make individual slopes unstable even when overall prediction remains strong.

The maximum VIF is 4.154856661640564 for G1, followed by 4.091388386290769 for G2. Both are below the selected guideline of 5. The scaled-predictor condition number is 4.250229914028819, also modest. The audit therefore treats collinearity as acceptable, while recognizing that G1 and G2 share substantial information.

Outliers, Leverage and Influence

An outlier has an unusual outcome error. A high-leverage case has an unusual predictor profile. An influential case changes fitted results materially when deleted. These concepts overlap but are not interchangeable.

The audit uses |externally studentized residual| > 3, leverage > 0.02157164869029276, Cook’s distance > 0.0061633281972265025, and |DFFITS| > 0.2077096468163805. Ten cases exceed the residual rule, 45 exceed the leverage rule, 26 exceed the Cook’s distance rule, 26 exceed the DFFITS rule, and 58 trigger at least one flag.

What Violations Mean

A violation does not automatically require abandoning the model. Functional-form evidence may motivate nonlinear terms or interactions. Heteroskedasticity may motivate robust standard errors, transformation, weighted least squares, or a modeled variance. Non-normal tails may motivate robust inference or sensitivity analysis. Influential observations require case review and refitting comparisons.

Advantages of a Full Assumption Audit

  • Separates prediction quality from inferential validity.
  • Identifies the specific model feature needing attention.
  • Prevents a single normality test from dominating the conclusion.
  • Links graphical evidence with formal statistics.
  • Shows whether results depend on a small number of observations.
  • Supports transparent remedial decisions.

Limitations

  • Formal tests can detect trivial departures in large samples.
  • Thresholds such as VIF 5 or Cook’s 4/n are guidelines, not laws.
  • Plots require judgment.
  • Passing one diagnostic does not prove an assumption universally.
  • Remedies can change the estimand or interpretation.
  • Data quality and study design cannot be repaired by diagnostics alone.
Introductory conclusion: the six-predictor model fits G3 strongly, but Regression Assumptions reveal meaningful functional-form, heteroskedasticity, residual-tail, and influence concerns. Independence and multicollinearity are comparatively well supported.
AdvertisementGoogle AdSense top placement reserved here

Quick Answer

RESET p0.001085
Breusch-Pagan p0.000010
Durbin-Watson1.860956
Maximum VIF4.154857

Conditions challenged

  • Functional form
  • Constant variance
  • Residual normality
  • Influence sensitivity

Conditions reasonably supported

  • No strong first-order residual autocorrelation
  • VIF values below 5
  • Scaled condition number well below 30
  • Strong overall model fit
Best one-sentence interpretation: the model explains about 85.06% of G3 variation, but conventional inference should be qualified because RESET, Breusch-Pagan, White, Shapiro-Wilk, and Jarque-Bera diagnostics identify model-form, variance, and residual-tail problems.
Influence conclusion: 58 of 649 observations trigger at least one screening rule; these cases require review and sensitivity analysis rather than automatic deletion.

Table of Contents

  1. Quick Answer
  2. Why This Analysis Needs Regression Assumptions
  3. How Regression Assumptions Are Evaluated
  4. Variables and Model Specification
  5. Formal Regression Assumptions Results
  6. Ten Python Chart Stories
  7. Four R Charts and Explanations
  8. Condition-by-Condition Interpretation
  9. Influential Cases and Sensitivity Analysis
  10. Consequences and Remedies
  11. Regression Assumptions in Python, R, SPSS and Excel
  12. Code
  13. Advanced Regression Assumptions Topics
  14. APA-Style Reporting
  15. Publication Checklist
  16. Downloads
  17. Related Salar Cafe Guides
  18. Frequently Asked Questions
  19. Regression Assumptions Conclusion

Why This Analysis Needs Regression Assumptions

Strong fit is incompleteR² does not evaluate functional form, variance, independence or influence.
Inference needs conditionsConventional standard errors and p-values rely on more than coefficient calculation.
Cases can dominateLarge residuals and unusual predictor profiles can change the fitted equation.

Regression Assumptions are necessary because a regression can explain a large proportion of sample variation and still provide misleading conventional inference. In this analysis, R² is 0.850632, but the RESET, Breusch-Pagan, White, Shapiro-Wilk and Jarque-Bera results identify important model-condition concerns.

Every Regression Assumptions finding has a different consequence. Functional-form evidence concerns the conditional mean. Heteroskedasticity concerns ordinary standard errors and confidence intervals. Non-normal tails concern exact reference distributions and unusual cases. VIF concerns coefficient precision. Cook’s distance concerns sensitivity to case deletion.

The purpose is not to force all diagnostics into a nonsignificant result. The purpose is to determine whether the reported estimand remains useful, which uncertainty method is defensible, and whether substantive conclusions survive reasonable alternatives.

Regression Assumptions also protect against mechanical remedies. Removing G1 or G2 merely to reduce VIF may omit important prior-grade information. Deleting all 58 flagged cases would redefine the sample. Adding polynomial terms until RESET becomes nonsignificant could overfit.

Decision principle: evaluate Regression Assumptions for the exact model, connect each warning to a specific consequence, and document robust or sensitivity analyses rather than issuing one universal pass-or-fail judgment.

The joint screen supports targeted case review instead of treating every flagged record as equally problematic.

How the Regression Assumptions Audit Works

Step 1Fit the declared model

Use one fixed sample and specification across all diagnostics. Every Regression Assumptions statistic answers a distinct diagnostic question.

Step 2Generate diagnostic quantities

Calculate residuals, fitted values, leverage, studentized residuals, Cook’s distance, DFFITS, VIF, and formal tests.

Step 3Diagnose and respond

Combine plots, tests, theory, and sensitivity analysis before choosing a remedy.

Residuals

eᵢ = yᵢ − ŷᵢ

Raw residuals show outcome-unit error. Standardized and studentized residuals adjust for estimated scale and leverage, making unusual cases easier to compare.

Leverage

hᵢᵢ = xᵢ′(X′X)⁻¹xᵢ

Leverage depends only on predictor geometry. The average leverage is (p + 1)/n = 7/649 ≈ 0.010786. The working threshold 2(p + 1)/n is 0.02157165.

Variance Inflation Factor

VIFⱼ = 1 / (1 − Rⱼ²); Toleranceⱼ = 1 / VIFⱼ

VIF measures how much coefficient variance is inflated by predictor overlap. It is not a measure of model fit or causal confounding.

Cook’s Distance

Cook’s distance combines residual size and leverage to summarize how much the fitted coefficient vector changes when a case is deleted. The guideline 4/n equals 0.00616333 in this sample.

DFFITS

DFFITS focuses on how much a case changes its own fitted value. The guideline 2√((p + 1)/n) equals 0.20770965.

Formal Tests and Graphs

RESET addresses omitted nonlinear structure; Breusch-Pagan and White address variance; Shapiro-Wilk and Jarque-Bera address residual distribution; Durbin-Watson addresses first-order sequence dependence. Plots show the direction, location, and practical nature of departures that a p-value alone cannot reveal.

Variables and Model Specification

VariableRoleMeaningDiagnostic relevance
G3OutcomeFinal gradeBounded 0–19 outcome; floor cases drive several large negative residuals
G1PredictorFirst-period gradeHigh overlap with G2; VIF = 4.154857
G2PredictorSecond-period gradeHigh overlap with G1; VIF = 4.091388
studytimePredictorWeekly study-time categoryVIF = 1.088056
failuresPredictorPrevious class failuresVIF = 1.306096
absencesPredictorAbsence countVIF = 1.048621
agePredictorAge in yearsVIF = 1.154871

The audit uses the same 649 complete cases for every model statistic and diagnostic. This consistency is essential because changing the sample changes residuals, thresholds, VIF values, and influence counts. Regression Assumptions results change if the variables, coding or analysis sample changes.

Specification rule: an assumption statement applies to one exact equation, coding scheme, sample, and estimator. It cannot be transferred automatically to a different model using the same dataset.

Complete Regression Assumptions Results

0.850632

Strong sample fit The Regression Assumptions table combines formal tests, geometry and influence evidence.

Adjusted R²0.849236

Six-predictor adjustment

RMSE1.254409

G3 units

Any influence flag58

Of 649 cases

Maximum Cook’s D0.176952

Above 4/n

Maximum leverage0.103309

Above 2(p+1)/n

ConditionDiagnosticStatisticpDecision
Functional formRamsey RESET F10.7740570.001085Potential violation
Residual normalityShapiro-Wilk0.7546976.2445 × 10−30Potential violation
Residual normalityJarque-Bera10152.729452≈ 0Potential violation
HomoscedasticityBreusch-Pagan LM33.0541920.000010Potential violation
HomoscedasticityWhite LM75.5474350.00000175Potential violation
IndependenceDurbin-Watson1.860956Reasonably supported
Variance patternCorrelation of fitted with |residual|−0.2096457.0257 × 10−8Potential violation
MulticollinearityMaximum VIF4.154857Acceptable under VIF < 5 guideline
MulticollinearityScaled condition number4.250230Supported
Influence measureThresholdCount above thresholdMaximum
|Externally studentized residual|3.000000107.590715
Leverage0.02157165450.103309
Cook’s distance0.00616333260.176952
|DFFITS|0.2077096526Reported in case register
Any screening ruleAt least one flag58
Balanced conclusion: the model is highly predictive in sample, and neither independence nor collinearity appears severe under the selected diagnostics. Functional form, variance constancy, normality, and influence require qualification and remedial analysis.

Open the Verified Files

These files contain the full diagnostic tables, case-level influence output, charts, and software results.

Ten Python Chart Stories

Each diagnostic figure is interpreted through its visible pattern, exact evidence, statistical meaning, and the appropriate next step. Each Regression Assumptions chart is interpreted with the corresponding numerical diagnostic.

Python Chart 1: Outcome Distribution Before Residual Modeling

Outcome Distribution Before Residual Modeling for Regression Assumptions
Python diagnostic: Outcome Distribution Before Residual Modeling.
Pattern

The outcome is bounded and concentrated in the middle, with a small group at zero.

Key Values

G3 ranges from 0 to 19, with 649 observations.

Interpretation

The outcome distribution is not itself a regression assumption, but it explains why floor observations later generate extreme negative residuals.

Why It Matters

Always distinguish the distribution of Y from the distribution of residuals after conditioning on predictors.

Python Chart 2: Observed Versus Fitted Values

Observed Versus Fitted Values for Regression Assumptions
Python diagnostic: Observed Versus Fitted Values.
Pattern

Most cases follow the diagonal, while several zero or very low outcomes sit far below their predictions.

Key Values

R² = 0.850632, adjusted R² = 0.849236, RMSE = 1.254409.

Interpretation

The model captures the dominant outcome pattern, but strong fit coexists with a small set of severe errors.

Why It Matters

Observed-versus-fitted agreement cannot prove linearity or homoscedasticity; it provides context for later diagnostics.

Python Chart 3: Residuals Versus Fitted Values

Residuals Versus Fitted Values for Regression Assumptions
Python diagnostic: Residuals Versus Fitted Values.
Pattern

The residual cloud is centered near zero but shows changing structure and extreme negative cases.

Key Values

RESET p = 0.001085; Breusch-Pagan p = 0.000010.

Interpretation

The plot and formal tests jointly suggest that the current additive linear specification and constant-variance assumption are incomplete.

Why It Matters

A remedy may require nonlinear terms, interactions, robust covariance, or a different variance model rather than simply deleting residual outliers.

Python Chart 4: Scale-Location Plot

Scale-Location Plot for Regression Assumptions
Python diagnostic: Scale-Location Plot.
Pattern

The smoothed square-root absolute residual pattern changes across fitted values instead of remaining flat.

Key Values

Correlation between fitted values and |residuals| = −0.209645, p < .001; White p = 0.00000175.

Interpretation

Residual spread is not constant. The negative correlation indicates larger absolute errors toward lower fitted values in this dataset.

Why It Matters

The direction of heteroskedasticity guides whether transformation, robust standard errors, or weighted modeling is sensible.

Python Chart 5: Residual Histogram

Residual Histogram for Regression Assumptions
Python diagnostic: Residual Histogram.
Pattern

Most errors cluster near zero, but a long negative tail produces substantial asymmetry and kurtosis.

Key Values

Shapiro-Wilk W = 0.754697; Jarque-Bera = 10152.729452.

Interpretation

The central mass is compact, but several extreme overpredictions make the residual distribution strongly non-normal.

Why It Matters

The histogram shows what the normality tests detect and prevents a tiny p-value from being interpreted without shape information.

Python Chart 6: Residual Q-Q Plot

Residual Q-Q Plot for Regression Assumptions
Python diagnostic: Residual Q-Q Plot.
Pattern

Central points are closer to the line, while tail observations diverge sharply, especially in the lower tail.

Key Values

Maximum |externally studentized residual| = 7.590715; 10 cases exceed 3.

Interpretation

Normality failure is driven primarily by extreme tails rather than a uniform mismatch across all quantiles.

Why It Matters

Robust inference and case sensitivity are more relevant than forcing perfect normality through arbitrary deletion.

Python Chart 7: Residual Sequence

Residual Sequence for Regression Assumptions
Python diagnostic: Residual Sequence.
Pattern

Residuals fluctuate around zero with isolated spikes and no dominant long drift.

Key Values

Durbin-Watson = 1.860956.

Interpretation

There is no strong evidence of first-order autocorrelation in the supplied order, but independence still depends on the sampling design.

Why It Matters

A Durbin-Watson result cannot detect every form of clustering and is meaningful only when row order represents a real sequence.

Python Chart 8: VIF Profile

VIF Profile for Regression Assumptions
Python diagnostic: VIF Profile.
Pattern

G1 and G2 have the largest VIF values, while the other predictors remain close to 1.

Key Values

G1 VIF = 4.154857; G2 = 4.091388; all others are below 1.31.

Interpretation

Prior grades share substantial information, but the selected VIF < 5 guideline is not exceeded.

Why It Matters

Moderate overlap can still affect individual coefficient precision even when it does not constitute a severe collinearity failure.

Python Chart 9: Cook’s Distance Across Cases

Cook's Distance Across Cases for Regression Assumptions
Python diagnostic: Cook’s Distance Across Cases.
Pattern

Most cases have negligible Cook’s distance, while a small set rises above the 4/n guideline.

Key Values

Threshold = 0.00616333; 26 cases exceed it; maximum = 0.176952.

Interpretation

A limited group has enough residual-leverage combination to affect the fitted equation materially.

Why It Matters

Refit the model without the most influential cases as a sensitivity analysis, then explain why estimates do or do not change.

Python Chart 10: Leverage and Studentized Residuals

Leverage and Studentized Residuals for Regression Assumptions
Python diagnostic: Leverage and Studentized Residuals.
Pattern

The joint plot separates unusual predictor profiles from unusual outcome errors and highlights cases high on both dimensions.

Key Values

Leverage threshold = 0.02157165; 45 cases exceed it; 58 cases trigger at least one rule.

Interpretation

High leverage alone is not an error. Cases become most concerning when high leverage combines with a large studentized residual or large Cook’s distance.

Why It Matters

The joint screen supports targeted case review instead of treating every flagged record as equally problematic.

R Charts and Explanations

The R figures verify the same outcome, fit, functional-form, and variance conclusions found in Python. The R figures reproduce the same Regression Assumptions conclusions using the supplied model.

R Regression Assumptions chart pair 1
R outcome distribution for Regression Assumptions
R distribution of G3 before fitting residual diagnostics.
R observed versus fitted values for Regression Assumptions
R comparison of observed and model-fitted G3.
Interpretation

R Outcome Distribution

The bounded grade scale and zero outcomes provide context for the strong lower residual tail. This is descriptive evidence rather than an assumption test.

Why It Matters: Outcome shape helps explain residual behavior but must not be confused with residual normality.
Interpretation

R Observed Versus Fitted Values

Most cases align well with predictions, confirming strong overall fit, while a small group of low outcomes remains far from the agreement line.

Why It Matters: Strong prediction and assumption violations can occur simultaneously.
R Regression Assumptions chart pair 2
R residuals versus fitted values for Regression Assumptions
R functional-form and variance diagnostic.
R scale location plot for Regression Assumptions
R square-root absolute residual pattern across fitted values.
Interpretation

R Residuals Versus Fitted Values

The residual pattern, RESET result, and Breusch-Pagan result jointly indicate that the current mean and variance specifications need qualification.

Why It Matters: Graphical direction is needed before deciding whether the remedy should target the mean, the variance, or both.
Interpretation

R Scale-Location Plot

The smooth pattern is not horizontal, consistent with the significant White test and fitted-versus-absolute-residual correlation.

Why It Matters: The plot shows where residual variance changes and supports robust or modeled-variance sensitivity analysis.

Condition-by-Condition Interpretation

Functional Form

The RESET result challenges the stated additive linear form. This does not mean the complete model is useless. It means fitted values contain systematic information not captured by the original predictor function. Candidate remedies may include a theory-supported G2 polynomial, interactions, transformations or a more flexible model. Regression Assumptions warnings should be translated into specific analytical consequences.

A Polynomial Regression term should not be added solely because RESET is significant. The altered model must be interpretable, validated and compared with the original.

Constant Variance

Breusch-Pagan, White and the scale-location pattern agree that residual variance changes with fitted values. Conventional OLS coefficients remain the same under robust covariance, but standard errors, confidence intervals and p-values may change.

HC3 robust standard errors are often a useful sensitivity analysis when leverage and unequal variance are both concerns. A transformation may also be considered when it matches the scientific scale and improves the conditional mean.

Residual Normality

Shapiro-Wilk and Jarque-Bera reject normality strongly. The plots show that the concern is concentrated in the tails, especially zero outcomes with predicted grades near the middle of the scale. Bootstrapping, robust uncertainty and influence sensitivity can supplement normal-theory results.

Independence

Durbin-Watson near 2 is supportive for first-order dependence in the supplied row order. It cannot detect every form of correlation. If students are nested within schools or classes, cluster-aware standard errors or multilevel models may still be necessary.

Multicollinearity

G1 and G2 are closely related but remain below the chosen VIF threshold. Their individual coefficients may be less stable than the overall prediction. Removing either variable solely to reduce VIF could omit important prior-grade information and change the estimand.

Outliers and Influence

Ten observations have externally studentized residuals beyond ±3, 45 have high leverage, 26 exceed the Cook’s distance rule, and 26 exceed the DFFITS rule. The union contains 58 observations.

These counts do not imply that 58 observations are erroneous. Each flag identifies a reason for closer examination. Sensitivity analysis should compare coefficients, uncertainty and predictions with influential cases retained, checked and, only where justified, excluded.

Interpretation rule: Regression Assumptions findings describe risks to a particular inference or model use. They should lead to transparent sensitivity analysis, not an automatic declaration that the entire regression is invalid.

Influential Cases and Sensitivity Analysis

Highest Cook’s Distance Cases

CaseObserved G3G1G2Fitted G3Raw residualExternally studentized residualLeverageCook’s DDFFITS
16401199.022936−9.022936−7.5907150.0228590.176952−1.160994
6400587.543323−7.543323−6.2528790.0202310.108871−0.898512
6380777.153776−7.153776−5.8889280.0129810.061908−0.675347
1731101010.044619−9.044619−7.5452310.0072630.054732−0.645369
6270755.481558−5.481558−4.4733880.0175050.049468−0.597102
5840866.179390−6.179390−5.0528350.0132030.047002−0.584455
6410776.920620−6.920620−5.6788190.0102250.045386−0.577207
5870888.250282−8.250282−6.8314400.0071610.044893−0.580174
5200877.343242−7.343242−6.0400590.0087620.043656−0.567873
2805787.704422−2.704422−2.2204170.0514670.037984−0.517219

Highest-Leverage Cases

Case 1 has maximum leverage of 0.103309 because G1 = 0 creates an unusual predictor profile, but its externally studentized residual is only 0.944918. Case 611 has leverage 0.084443, and cases 598, 198 and 213 also have leverage above 0.06. High leverage alone does not mean the observed outcome is poorly fitted. Regression Assumptions case flags are screening tools rather than deletion commands.

Recommended Sensitivity Sequence

  1. Verify source values, coding and outcome status for every extreme case.
  2. Refit the original model with HC3 robust standard errors.
  3. Compare coefficients with and without the highest Cook’s distance cases, while reporting both analyses.
  4. Evaluate a theory-supported alternative mean function.
  5. Recalculate every Regression Assumptions diagnostic for the revised specification.
  6. Explain whether conclusions change materially or only numerically.
Deletion warning: do not remove all 58 flagged observations. The flags overlap, many cases are valid, and automatic deletion can redefine the population and create a misleadingly clean model.

Regression Assumptions, Consequences and Remedies

ConditionCurrent evidenceMain consequenceReasonable response
Functional formRESET p = .001085Biased conditional mean or systematic residual patternTest theory-based nonlinear terms, interactions, splines, or alternative specification
HomoscedasticityBP and White p < .001Conventional SEs may be wrongRobust covariance, transformation, weighted or generalized least squares
Residual normalityShapiro and JB reject; tail departures visibleExact small-sample intervals/tests affectedRobust or bootstrap inference; inspect influential cases
IndependenceDW = 1.861No strong first-order autocorrelation detectedStill verify clustering from design
MulticollinearityMaximum VIF = 4.155Moderate precision inflation for G1/G2Retain if theoretically needed; report conditional effects
Influence58 cases trigger a rulePotential sensitivity of coefficients and predictionsCase review and sensitivity refits

Robust Standard Errors

HC3 or another heteroskedasticity-consistent covariance estimator can be reported when the linear coefficient estimand remains useful. Robust standard errors do not repair omitted nonlinear structure; they address uncertainty under unequal variance. Every Regression Assumptions remedy requires a fresh diagnostic audit.

Transformations

Transformations can change variance and functional form together, but they also change interpretation. Select them because they produce a scientifically meaningful scale, not only because a test p-value becomes larger.

Weighted and Generalized Least Squares

When residual variance can be modeled from predictors or fitted values, weighted least squares or GLS may improve efficiency. Incorrect weights can worsen results, so the variance model needs validation.

Robust Regression

Robust Regression reduces the impact of extreme residuals, but it answers a somewhat different fitting question from OLS. Compare conclusions rather than silently replacing the original model.

Model Respecification

RESET evidence supports investigating nonlinear and interaction terms. Respecification should avoid data-driven overfitting and preserve hierarchical principles.

Recommended sequence: verify influential records, fit robust standard errors, investigate theory-supported mean-structure changes, compare sensitivity models, and report which substantive conclusions remain stable.

Regression Assumptions in Python, R, SPSS and Excel

Python

Statsmodels and SciPy support residual tests, VIF, influence measures, robust covariance, and diagnostic plots. Regression Assumptions comparisons require identical models and definitions across software.

  • RESET, Breusch-Pagan, White, Jarque-Bera
  • Durbin-Watson and VIF
  • Externally studentized residuals
  • Leverage, Cook’s distance, DFFITS

Open the Python report

R

R combines lm(), diagnostic plots, car, lmtest, and influence functions for a reproducible audit.

  • resettest()
  • bptest()
  • vif()
  • influence.measures()

Open the R report

SPSS

SPSS REGRESSION can save residuals, leverage, Cook’s distance, and predicted values. Additional diagnostics can be produced through plots, collinearity statistics, and supported extensions.

Open the SPSS output

Excel

Excel can calculate residuals, standardized residuals, VIF support regressions, thresholds, and influence flags. Specialized software remains preferable for externally studentized residuals and formal tests.

Open the worked Excel workbook

Code: Expand Only the Software You Need

Python Regression Assumptions code
import pandas as pd
import statsmodels.api as sm
from scipy import stats
from statsmodels.stats.diagnostic import (
    linear_reset, het_breuschpagan, het_white
)
from statsmodels.stats.outliers_influence import (
    OLSInfluence, variance_inflation_factor
)
from statsmodels.stats.stattools import durbin_watson, jarque_bera

df = pd.read_csv("dataset.csv")
cols = ["G3","G1","G2","studytime","failures","absences","age"]
work = df[cols].dropna().copy()

y = work["G3"].astype(float)
X = sm.add_constant(work[cols[1:]].astype(float))
model = sm.OLS(y, X).fit()

reset = linear_reset(model, power=2, use_f=True)
bp = het_breuschpagan(model.resid, model.model.exog)
white = het_white(model.resid, model.model.exog)
shapiro = stats.shapiro(model.resid)
jb = jarque_bera(model.resid)
dw = durbin_watson(model.resid)

influence = OLSInfluence(model)
studentized = influence.resid_studentized_external
leverage = influence.hat_matrix_diag
cooks_d = influence.cooks_distance[0]
dffits = influence.dffits[0]

print(model.summary())
print("RESET:", reset.fvalue, reset.pvalue)
print("Breusch-Pagan:", bp)
print("White:", white)
print("Shapiro:", shapiro)
print("Jarque-Bera:", jb)
print("Durbin-Watson:", dw)
R Regression Assumptions code
df <- read.csv("dataset.csv")
work <- na.omit(df[c(
  "G3","G1","G2","studytime","failures","absences","age"
)])

model <- lm(
  G3 ~ G1 + G2 + studytime + failures + absences + age,
  data = work
)

summary(model)
par(mfrow = c(2, 2))
plot(model)

library(lmtest)
library(car)

resettest(model, power = 2, type = "fitted")
bptest(model)
durbinWatsonTest(model)
vif(model)

shapiro.test(residuals(model))
cooks.distance(model)
hatvalues(model)
rstudent(model)
dffits(model)
SPSS Regression Assumptions syntax
REGRESSION
 /DEPENDENT G3
 /METHOD=ENTER G1 G2 studytime failures absences age
 /STATISTICS COEFF OUTS R ANOVA CI(95) COLLIN TOL
 /RESIDUALS HISTOGRAM(ZRESID) NORMPROB(ZRESID)
 /SCATTERPLOT=(*ZPRED,*ZRESID)
 /SAVE PRED(PRED_G3)
       RESID(RESID_G3)
       SRESID(SRESID_G3)
       SDRESID(SDRESID_G3)
       LEVER(LEV_G3)
       COOK(COOK_G3).

OUTPUT EXPORT
 /CONTENTS EXPORT=ALL LAYERS=PRINTSETTING MODELVIEWS=PRINTSETTING
 /PDF DOCUMENTFILE=
'D:\DATA ANALYSIS\H Regression Tests and Models\Regression Assumptions\SPSS_Output\pdf\Regression-Assumptions-SPSS-Output.pdf'.
Excel diagnostic formulas
Raw residual:
=Observed_G3-Predicted_G3

Standardized residual:
=Residual/RMSE

Leverage guideline:
=2*(Predictor_Count+1)/N

Cook's distance guideline:
=4/N

DFFITS guideline:
=2*SQRT((Predictor_Count+1)/N)

Tolerance:
=1-R_Squared_From_Auxiliary_Regression

VIF:
=1/Tolerance

Any influence flag:
=OR(
 ABS(Studentized_Residual)>3,
 Leverage>Leverage_Threshold,
 Cooks_Distance>Cooks_Threshold,
 ABS(DFFITS)>DFFITS_Threshold
)

[]
[]
[]
[]
[]
[]
[]

Advanced Regression Assumptions Topics

Regression Assumptions Overview

Regression Assumptions are separate model conditions. Each condition requires its own evidence, consequence and response. Regression Assumptions interpretation should remain tied to the declared model.

Linearity of the Conditional Mean

Linearity concerns whether the stated predictor function represents expected G3 adequately. A model can contain polynomial and interaction terms while remaining linear in coefficients. Regression Assumptions interpretation should remain tied to the declared model.

Ramsey RESET Test

The Ramsey RESET Test detects omitted functional structure through powers of fitted values. It does not reveal which term should be added. Regression Assumptions interpretation should remain tied to the declared model.

Residuals Versus Fitted Plot

A systematic smooth suggests mean misspecification. A changing vertical spread suggests unequal variance. Individual distant points suggest case review. Regression Assumptions interpretation should remain tied to the declared model.

Additivity

Additivity assumes predictor contributions combine without omitted interactions. Subject-matter theory should determine which interactions are plausible. Regression Assumptions interpretation should remain tied to the declared model.

Interaction Effects

Interactions change the effect of one predictor across another predictor. They should be explained with predicted values rather than coefficient signs alone. Regression Assumptions interpretation should remain tied to the declared model.

Homoscedasticity

Homoscedasticity means conditional residual variance is stable. Violation mainly affects conventional uncertainty, not the numerical ability to calculate OLS coefficients. Regression Assumptions interpretation should remain tied to the declared model.

Breusch-Pagan Test

The Breusch-Pagan Test evaluates whether residual variance is associated with the predictor design. Regression Assumptions interpretation should remain tied to the declared model.

White Test

The White Test provides a broader variance-specification check that can capture nonlinear variance patterns. Regression Assumptions interpretation should remain tied to the declared model.

Robust Standard Errors

HC3 robust covariance is especially relevant when leverage and unequal variance occur together. Coefficients remain unchanged while uncertainty is recalculated. Regression Assumptions interpretation should remain tied to the declared model.

Residual Normality

Normality supports exact small-sample t and F reference distributions. Large samples provide some protection, but severe tails still affect influence and uncertainty. Regression Assumptions interpretation should remain tied to the declared model.

Shapiro-Wilk Test

The Shapiro-Wilk Test is sensitive to departures from normality and should be interpreted with the histogram and Q-Q plot. Regression Assumptions interpretation should remain tied to the declared model.

Jarque-Bera Test

The Jarque-Bera Test combines residual skewness and kurtosis into a distribution-shape diagnostic. Regression Assumptions interpretation should remain tied to the declared model.

Q-Q Plot

A Q-Q plot reveals whether departures occur through the complete distribution or are concentrated in one or both tails. Regression Assumptions interpretation should remain tied to the declared model.

Independence of Errors

Independence follows from design and sampling. Residual-order diagnostics cannot rule out school, class or subject clustering. Regression Assumptions interpretation should remain tied to the declared model.

Durbin-Watson Statistic

The Durbin-Watson Test targets first-order autocorrelation when record order represents a meaningful sequence. Regression Assumptions interpretation should remain tied to the declared model.

Clustered Observations

Clustered observations require cluster-robust, generalized estimating equation or multilevel methods even when Durbin-Watson is near 2. Regression Assumptions interpretation should remain tied to the declared model.

Variance Inflation Factor

Variance Inflation Factor measures how strongly one predictor is explained by the remaining predictors and how much its coefficient variance is inflated. Regression Assumptions interpretation should remain tied to the declared model.

Tolerance

Tolerance Statistic equals 1/VIF and describes the predictor variation remaining after the other predictors are considered. Regression Assumptions interpretation should remain tied to the declared model.

Condition Number

The scaled condition number evaluates numerical dependence in the complete design matrix and complements predictor-specific VIF values. Regression Assumptions interpretation should remain tied to the declared model.

Leverage

Leverage measures how unusual a predictor profile is. A high-leverage case can have either a small or large residual. Regression Assumptions interpretation should remain tied to the declared model.

Externally Studentized Residuals

Studentized Residuals scale errors for residual variance and leverage. External studentization leaves the case out of the variance estimate. Regression Assumptions interpretation should remain tied to the declared model.

Cook’s Distance

Cook’s Distance combines residual magnitude and leverage to screen for cases that may alter the fitted equation. Regression Assumptions interpretation should remain tied to the declared model.

DFFITS

DFFITS measures the standardized change in a case’s fitted value when that observation is removed. Regression Assumptions interpretation should remain tied to the declared model.

Influence Sensitivity Analysis

Compare the original coefficients and conclusions with transparent refits that address the most influential cases. Do not present automatic deletion as a remedy. Regression Assumptions interpretation should remain tied to the declared model.

Reporting Regression Assumptions

State the diagnostic, statistic, threshold or p-value, visible pattern, consequence, and analytical response for each condition. Regression Assumptions interpretation should remain tied to the declared model.

APA-Style Reporting

APA example: Regression Assumptions were evaluated for an ordinary least squares model predicting G3 from G1, G2, studytime, failures, absences and age using 649 complete observations. The model explained substantial variation, R² = .851, adjusted R² = .849, RMSE = 1.254, F(6, 642) = 609.35, p < .001.

Functional form was challenged by Ramsey RESET, F = 10.77, p = .001. Heteroskedasticity was indicated by the Breusch-Pagan test, LM = 33.05, p < .001, and the White test, LM = 75.55, p < .001.

Residual normality was rejected, Shapiro-Wilk W = .755, p < .001, and Jarque-Bera = 10152.73, p < .001. Durbin-Watson was 1.86, providing no strong evidence of first-order autocorrelation in the supplied record order.

The largest VIF was 4.15 for G1, followed by 4.09 for G2. Influence screening identified 10 residual outliers, 45 high-leverage observations, 26 cases above the Cook’s distance rule and 26 above the DFFITS rule; 58 observations met at least one rule.

Regression Assumptions findings therefore supported reporting heteroskedasticity-robust uncertainty, a theory-led functional-form comparison and influential-case sensitivity analysis.

Publication Checklist

Include

  • Outcome, predictors, sample size and estimator
  • Residual-versus-fitted and scale-location plots
  • RESET, Breusch-Pagan and White results
  • Histogram, Q-Q plot and normality evidence
  • Independence rationale and Durbin-Watson where appropriate
  • VIF, tolerance and condition number
  • Studentized residual, leverage, Cook’s distance and DFFITS rules
  • Robust and influence sensitivity analyses

Avoid

  • One universal pass-or-fail conclusion
  • Calling R² a Regression Assumptions test
  • Testing outcome normality instead of residual behavior
  • Treating VIF 5 as a universal law
  • Calling Durbin-Watson proof of complete independence
  • Deleting every flagged observation
  • Changing the equation only to improve plots
  • Reporting formal tests without practical consequences

Connect Regression Assumptions p-values to P-Value, uncertainty to Confidence Interval and Standard Error, and substantive magnitude to Effect Size.

Downloads

Frequently Asked Questions

What are Regression Assumptions?

Regression Assumptions are model-specific conditions concerning functional form, residual variance, dependence, predictor geometry, distribution shape and influential observations. Regression Assumptions conclusions should remain condition-specific.

Did every condition pass?

No. Functional form, constant variance and residual normality are challenged. The selected collinearity guidelines and first-order residual-order check are reasonably supported. Regression Assumptions conclusions should remain condition-specific.

Does high R-squared prove the assumptions are met?

No. R-squared measures sample variation explained and does not test form, variance, normality, independence or influence. Regression Assumptions conclusions should remain condition-specific.

What does the significant RESET result mean?

It suggests omitted mean structure but does not identify the correct polynomial, interaction or transformation. Regression Assumptions conclusions should remain condition-specific.

What should be done about heteroskedasticity?

Use suitable robust standard errors, review the mean specification and consider a scientifically meaningful variance or transformation model. Regression Assumptions conclusions should remain condition-specific.

Do non-normal residuals invalidate OLS coefficients?

Not automatically. Point estimates may remain useful, but exact normal-theory inference and tail-sensitive conclusions need qualification. Regression Assumptions conclusions should remain condition-specific.

Is Durbin-Watson 1.86 acceptable?

It is close to 2 and does not indicate strong first-order autocorrelation in the supplied order, but independence still depends on design. Regression Assumptions conclusions should remain condition-specific.

Are G1 and G2 too collinear?

Their VIF values are approximately 4.15 and 4.09. They share substantial information but remain below the selected threshold of 5. Regression Assumptions conclusions should remain condition-specific.

What is the leverage threshold?

The selected rule is 2(p + 1)/n = 0.02157165. Forty-five cases exceed it. Regression Assumptions conclusions should remain condition-specific.

What is the Cook’s distance threshold?

The selected 4/n guideline is 0.00616333. Twenty-six cases exceed it. Regression Assumptions conclusions should remain condition-specific.

How many residual outliers were found?

Ten observations have absolute externally studentized residuals greater than 3. Regression Assumptions conclusions should remain condition-specific.

Should all 58 flagged cases be deleted?

No. A flag requests verification and sensitivity analysis. Automatic deletion can bias the sample. Regression Assumptions conclusions should remain condition-specific.

What is the most influential case?

Case 164 has Cook’s distance 0.176952, externally studentized residual −7.590715 and DFFITS −1.160994. Regression Assumptions conclusions should remain condition-specific.

Why is case 1 important?

Case 1 has maximum leverage of 0.103309 but a moderate residual, illustrating that leverage and outlyingness are different. Regression Assumptions conclusions should remain condition-specific.

Can Regression Assumptions be checked in Excel?

Excel can audit formulas and flags, but Python, R or SPSS is preferable for formal tests and matrix-based influence measures. Regression Assumptions conclusions should remain condition-specific.

How should Regression Assumptions be reported?

Report every condition separately with its diagnostic evidence, consequence and any robust or sensitivity analysis performed. Regression Assumptions conclusions should remain condition-specific.

Regression Assumptions Conclusion

The Regression Assumptions audit produces a mixed result. The six-predictor model explains approximately 85.06% of G3 variation and does not show severe multicollinearity or strong first-order residual autocorrelation under the selected rules.

Ramsey RESET challenges the stated functional form, Breusch-Pagan and White tests challenge constant variance, and residual normality tests reveal severe tail departures. Influence screening identifies a smaller group of cases with large errors, unusual predictor profiles or both.

The appropriate response is not to discard the model or remove every flagged observation. The original equation should remain a transparent baseline, conventional inference should be compared with robust inference, a limited theory-led alternative form should be evaluated, and influence sensitivity should be documented.

Final interpretation: Regression Assumptions are not uniformly satisfied. The model has strong explanatory fit, but reliable reporting requires robust standard errors, functional-form investigation and transparent sensitivity analysis.
AdvertisementGoogle AdSense bottom placement reserved here

Back to top

Need help applying this to your own data?

Salar Cafe can help interpret output, clean datasets, review assumptions, build dashboards and explain statistical results ethically.

Need help interpreting your data analysis results?

Contact Salar Cafe
Engr. Muhammad Yar Saqib author profile photo

Engr. Muhammad Yar Saqib

WhatsApp Get Data Analysis Help