Glejser Test for Heteroskedasticity Calculator

Test variance patterns with flexible residual regression tools. Choose transforms, review statistics, and export results. Use concise outputs to improve model diagnostics before decisions.

Calculator Input

Use a header row. Place the dependent variable first. Add predictor columns after it.

Example Data Table

sales ads price income
52 8 4.2 41
58 10 4.0 45
61 12 3.9 48
66 13 3.8 52
72 15 3.6 55

Formula Used

First, the page estimates the original least squares model, y = b0 + b1x1 + ... + bkxk + e. Then it saves each residual, e. The Glejser auxiliary model regresses |e| on transformed predictor terms, such as x, sqrt(abs(x)), ln(abs(x)), 1 / abs(x), or x squared.

The main statistic is F = (R² / q) / ((1 - R²) / (n - k)), where R² comes from the auxiliary model, q is the number of tested auxiliary terms, n is the auxiliary sample size, and k is the number of auxiliary regression parameters including the intercept.

How to Use This Calculator

  1. Paste data with the dependent variable in the first column.
  2. Keep one header row so column names appear in results.
  3. Choose one or more Glejser transforms.
  4. Enter predictor names or leave the field blank.
  5. Set alpha, then press Calculate Test.
  6. Export the summary as CSV or PDF when needed.

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.

FAQs

What is the Glejser test?

It is a heteroskedasticity diagnostic. It regresses absolute residuals from the original model on one or more predictor transformations.

What does a small p value mean?

A small p value suggests residual spread may change with predictors. That is evidence against constant error variance.

Which column should come first?

Place the dependent variable first. Put all predictor columns after it. Keep a clear header row for readable outputs.

Can I use several transforms?

Yes. Multiple transforms can test several variance shapes. Use caution when the sample is small or predictors are highly related.

Why are some rows skipped?

Rows are skipped when selected transforms cannot be computed. Zero values affect reciprocal and logarithmic options.

Does this prove heteroskedasticity?

No test gives absolute proof. The result gives evidence. Use it with residual plots and modeling judgment.

What should I do after rejection?

Consider robust standard errors, transformed variables, weighted regression, or a revised model specification.

Can I export results?

Yes. Use the CSV button for spreadsheet work. Use the PDF button for a compact report.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.