Stats Regression wls - CyrilB1531/lodestar GitHub Wiki

HomeStats-Regression

Weighted least squares — Lodestar.Stats.Regression

One entry point, for a linear model whose rows are not equally trusted. WeightedLeastSquares.Fit fits a linear model with one weight per row and returns the same OlsSummary an ordinary fit does, at statsmodels.api.WLS parity.

A weight is how much a row is trusted, proportional to the inverse of its variance: a mean over forty observations deserves more say than a mean over three. The design, the options and the table are those of ordinary least squares, so a caller who already reads one reads the other.

Why this exists

MathNet.Numerics 5.0.0 exports WeightedRegression.Weighted, and like every regression entry point in that assembly it returns the coefficients and stops — the reading decisions/0003 recorded for the unweighted fit holds here unchanged. Decision 0004 put the weighted table first after the robust covariances.

Types

Type What it is
WeightedLeastSquares Fits the weighted model and builds the table.

The summary, the options and the covariance choice are OlsSummary, OlsOptions and CovarianceType.

See also