-
Notifications
You must be signed in to change notification settings - Fork 0
Stats Regression iv
One entry point, InstrumentalVariables, for a regressor that is
correlated with the error — measured with error, chosen by the unit being measured, or determined
jointly with the response. Least squares is biased there, and no amount of data removes the bias;
an instrument that moves the regressor and touches the response only through it does. Two-stage
least squares, LIML and two-step GMM are fitted with the whole table linearmodels reports: the
estimates and their errors under four covariances, the first-stage diagnostics that say whether the
instruments are strong, and the overidentification test that says whether they agree.
No .NET library publishes an instrumental-variables estimator with its inference table: Math.NET
Numerics, Accord and ML.NET fit least squares and stop
(decision 0004). The
estimators are closed forms, so they are replayed against linearmodels at 1e-9 from a frozen
corpus rather than approximated.
| Type | What it is |
|---|---|
InstrumentalVariables |
Fits 2SLS, LIML and two-step GMM and builds the table. |
The data it takes and returns — IvDesign,
IvOptions, IvSummary and the rest —
live in Lodestar.Stats.Regression.Instrumental.
- Ordinary least squares — the estimator this one corrects.
- Regression inference — reading the table.
- Python → C# equivalence.