LinRegAngleArray (Function)
The LinRegAngleArry function calculates the angle of a linear regression line from an array of values.
Syntax
LinRegAngleArray(PriceArray, Size)
Returns (Integer)
LinRegArray returns the angle of the linear regression line.
Parameters
|
Name |
Type |
Description |
|
PriceArray |
NumericArray |
Specifies the numeric array of data elements to evaluate. |
|
Size |
Numeric |
Sets the number of elements (size) in the array to consider. |
Remarks
Linear Regression is a concept also known as the "least squares method" or "best fit." Linear Regression attempts to fit a straight line between several data points in such a way that distance between each data point and the line is minimized.
The equation of any line resembles the following:
y = mx + b
In the equation m refers to the slope of the regression line, b refers to the constant intercept of the y-axis, x is the independent variable, and y is the dependent variable. This function returns all values.
Example
Assigns to Value1 the angle of a linear regression line.
Array: myArray[20](0);
Value1 = LinRegAngleArray (myArray, 20);