RegModels::LnFit Function

void LnFit(TVec *B, TVec *X, TVec *Y, TVec *Weights = null);

Fits simple logarithm equation y(x)=b[0] + b[1]*ln(x) to data.

#NameTypeDescription
1BTVec *Returns regression coefficients for natural logarithm function.
2XTVec *Vector of independent variable.
3YTVec *Vector of dependent variable.
4Weights = 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=b[0]+b[1]ln(x)Y = b[0] + b[1] \ln(x)
See Also: RegModels::LnEval
Declared in Dew::Stats::Units::RegModels · Dew.Stats/Units.RegModels.h · Cross-compiler