M-Estimator Regression Calculator

Tune psi functions, scale estimates, and stopping rules. Review coefficients, diagnostics, and weighted residual patterns. Make better decisions when ordinary fitting gets distorted easily.

Enter data and options

Use commas, spaces, tabs, or semicolons between x and y. This page fits a robust simple linear model with one predictor.

Example data table

This sample contains a visible high-value point, which helps demonstrate how robust fitting can resist distortion better than ordinary least squares.

Point X Y
112.1
224.2
336.0
448.1
5510.2
6612.1
7714.0
8816.3
9927.8
101020.1

Formula used

Model: yi = β0 + β1xi + εi

Residual: ri = yi - ŷi

Robust scale: s = median(|ri - median(r)|) / 0.6745

Standardized residual: ui = ri / s

M-estimator objective: minimize Σρ(ui)

IRLS weight: wi = ψ(ui) / ui

Weighted update: solve the weighted least-squares line using the current wi values, then repeat until coefficients stabilize.

Huber: keeps full weight for small residuals and clips extreme influence.

Tukey biweight: strongly suppresses far outliers and can reduce their weight to zero.

Cauchy: smoothly reduces leverage as residual size increases.

Welsch: aggressively downweights large deviations with an exponential rule.

How to use this calculator

  1. Paste your x and y pairs into the dataset box, one point per line.
  2. Select a loss function that matches how strongly you want to resist outliers.
  3. Set the tuning constant, iteration limit, tolerance, and intercept option.
  4. Optionally enter x values for predicted y outputs.
  5. Click Calculate regression to generate coefficients, diagnostics, tables, and graphs.
  6. Review the comparison table to see how the robust line differs from ordinary least squares.
  7. Use the CSV button for tabular exports and the PDF button for a report snapshot.

Frequently asked questions

1) What does an M-estimator regression do?

It fits a regression line while reducing the effect of unusual observations. Instead of treating every residual equally, it reweights points according to the chosen loss function.

2) Why use this instead of ordinary least squares?

Ordinary least squares can tilt heavily toward outliers. A robust fit usually stays closer to the main data pattern when a few points are extreme, miscoded, or highly influential.

3) What does the tuning constant control?

The tuning constant determines how quickly a method starts downweighting residuals. Smaller values resist outliers more strongly, while larger values behave more like ordinary least squares.

4) Which loss function should I choose?

Huber is a balanced default. Tukey is stronger against outliers. Cauchy and Welsch provide smoother damping. A good choice depends on whether you expect mild contamination or severe extreme points.

5) What does the flagged points count mean?

Flagged points are observations with large standardized residuals or low final weights. They are not automatically wrong, but they deserve inspection because they affect fit stability.

6) Why can robust and ordinary coefficients differ a lot?

A large difference usually means some observations have strong leverage or unusually large residuals. Robust fitting dampens that influence, so the final slope and intercept may shift toward the central trend.

7) Can this page handle multiple predictors?

This implementation handles one predictor and one response at a time. It is designed for simple linear robust regression with optional intercept control and detailed diagnostic output.

8) What does pseudo R² mean here?

It summarizes how much variation the fitted line explains using the final robust predictions. It is useful for comparison, but robust methods should also be judged with weights, residuals, and scale.

Related Calculators

winsorized mean calculatorrobust covariance estimatorrobust logistic regressionbiweight midvariancerobust quantile regressionhuber m estimator

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.