Visual Basic (Declaration) | |
---|---|
Public Overloads Shared Function TrendLinePolynomial( _ ByVal s As Series, _ ByVal degree As Integer _ ) As Series |
Visual Basic (Usage) | Copy Code |
---|---|
|
Parameters
- s
- A statistical series.
- degree
- The degree of the polynomial which is fitted to the data set given (i.e. if degree is 2, then a quadratic is fitted).
For example, if we fit a polynomial of degree 2, then we fit the quadratic polynomial
(i.e. f(x) = a_0 + a_1 x + a_2 x^2); similarly if we fit a polynomial of degree 3,
then we fit the cubic polynomial (i.e. f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3).