RegModels::MulLinFit Function

void MulLinFit(TVec *B, TMtx *X, TVec *Y, bool Constant = false, TVec *Weights = null);

Fits multiple linear equations to data.

#NameTypeDescription
1BTVec *Returns regression coefficients for multiple linear function.
2XTMtx *Vector of independent variable.
3YTVec *Vector of dependent variable.
4Constant = falseboolIf true then intercept term b(0) will be included in calculations. If false, set intercept term b(0) to 0.0.
5Weights = nullTVec *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:

Y=Xb.\vec Y= \underline{X} \cdot \vec b \quad .

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