Glejser Test Guide
Purpose
The Glejser test is a regression diagnostic. It checks whether error spread changes with predictors. Ordinary least squares assumes constant variance. That assumption is called homoskedasticity. When the spread changes, standard errors can become misleading. Coefficients may still look reasonable. Yet confidence intervals and significance tests may be distorted. This calculator helps you inspect that risk with clear steps.
How It Works
The process starts with an original regression model. The first column is treated as the dependent variable. The remaining columns are treated as predictors. The calculator estimates fitted values and residuals. It then converts residuals to absolute residuals. These absolute residuals become the dependent variable in a second model. This second model is the auxiliary Glejser regression.
Transform Choices
Glejser testing often uses transformed predictor values. Common choices include x, square root values, logarithms, reciprocals, and squared terms. Different transforms capture different variance patterns. A linear term can detect simple growth in spread. A logarithmic term can detect slower changes. A reciprocal term can detect shrinking spread as a predictor grows. You may select several transforms together. Use enough terms to explore the pattern. Avoid too many terms with small samples.
Reading Results
The overall F test checks whether auxiliary terms explain absolute residuals. A small p value suggests heteroskedasticity. A larger p value means the test did not find strong evidence. It does not prove perfect constant variance. It only says this test did not detect a clear pattern. Review individual coefficient p values too. They show which transformed terms may be related to residual size.
Practical Notes
Use clean numeric data. Keep each row complete. Remove duplicate columns. Avoid zero values when using reciprocal or logarithmic transforms. The calculator skips rows that cannot support selected transforms. For final analysis, combine this test with plots, robust standard errors, and subject knowledge. Diagnostics work best when they support careful modeling, not automatic decisions. Always document chosen variables, transformations, alpha level, and sample size.
Model Care
Report the original equation before sharing conclusions. Check leverage points because unusual rows can influence residual size. If theory suggests grouped variance, compare groups directly. A single diagnostic should start questions, not end analysis. Record assumptions for future review.