IMSL C# Numerical Library

LinearRegression.GetCoefficients Method 

Returns the regression coefficients.

public double[] GetCoefficients();

Return Value

A double array containing the regression coefficients.

Remarks

If HasIntercept is false its length is equal to the number of variables. If HasIntercept is true then its length is the number of variables plus one and the 0-th entry is the value of the intercept.

Exceptions

Exception Type Condition
SingularMatrixException is thrown when the regression matrix is singular

See Also

LinearRegression Class | Imsl.Stat Namespace