Calculates the value of the regression function for an intermediate x-value.
Syntax
NxRegress(X, Y, Regression_type, POrder, Const, target, Return_type, Alpha)
- X
- is the x-component of the input data table (a one-dimensional array of cells (e.g., rows or columns)).
- Y
- is the y-component (i.e. function) of the input data table (a one-dimensional array of cells (e.g., rows or columns)).
- Regression_type
- is the model description flag for the trend function (1 = Linear (default), 2 = Polynomial, 3 = Exponential, 4 = Logarithmic, 5 = Power).
Order Description 1 Linear (default). 2 Polynomial. 3 Exponential. 4 Logarithmic. 5 Power. - POrder
- is the polynomial order. This is only relevant for a polynomial type of trend and is ignored for all others. If missing, POrder = 1.
- Const
- is the constant or the intercept value to fix (e.g. zero). If missing, an intercept will not be fixed and is computed normally.
- target
- is the desired x-value to calculate the regression value for (a single value).
- Return_type
- is a switch to select the return output (1 = Forecast value (default), 2 = Upper limit, 3 = Lower Limit, 4 = R-Squared).
Method Description 1 Forecast value (default). 2 C.I. upper limit. 3 C.I. lower limit. 4 R-Squared. - Alpha
- is the statistical significance or confidence level (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed.
Remarks
- NxRegress supports the following trend functions:
$$ \begin{cases} \mathrm{Linear} & Y=\alpha + \beta \times X \\ \mathrm{Polynomial} & Y=\alpha + \beta_1 \times X + \beta_2 \times X^2 + \cdots + \beta_N \times X^N \\ \mathrm{Exponential:} & Y= \alpha \times e^{\beta \times X} \\ \mathrm{Logarithm:} & Y= \alpha + \beta \times \ln(X) \\ \mathrm{Power:} & Y= \alpha \times X^{\beta} \\ \end{cases} $$ - For exponential and logarithmic trends, the intercept value is not permitted to be fixed and thus is ignored.
- The polynomial order argument must be a positive integer.
- The trend function's coefficients that best fit your data are estimated using the "least squares" method.
- The time series may include missing values (e.g. #N/A) at either end.
Examples
Example 1:
|
|
Formula | Description (Result) |
---|---|
=NxRegress($A$1:$A$20,$B$1:$B$20,1,,,2,1) | Linear NxRegress (8.633). |
=NxRegress($A$1:$A$20,$B$1:$B$20,2,,,3,1) | Polynomial NxRegress (11.945). |
=NxRegress($A$1:$A$20,$B$1:$B$20,3,,,2,1) | Exponential NxRegress (9.185). |
=NxRegress($A$1:$A$20,$B$1:$B$20,4,,,3,1) | Logarithmic NxRegress (12.275). |
=NxRegress($A$1:$A$20,$B$1:$B$20,5,,,2,1) | Power NxRegress (8.515). |
Files Examples
Related Links
References
- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6.
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740.
Comments
Article is closed for comments.