void MulLinFit(TVec *B, TMtx *X, TVec *Y, bool Constant = false, TVec *Weights = null);
Fits multiple linear equations to data.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | TVec * | Returns regression coefficients for multiple linear function. |
| 2 | X | TMtx * | Vector of independent variable. |
| 3 | Y | TVec * | Vector of dependent variable. |
| 4 | Constant = false | bool | If true then intercept term b(0) will be included in calculations. If false, set intercept term b(0) to 0.0. |
| 5 | Weights = null | TVec * | Weights (optional). Weights are used only if they are set. |
Remarks:
The routine fits equations to data by minimizing the sum of squared residuals. The observed values obey the following equation:
where X is matrix, Y, B are vectors.
See Also: RegModels::MulLinEval
Declared in Dew::Stats::Units::RegModels · Dew.Stats/Units.RegModels.h · Cross-compiler