Returns the (Nadaraya–Watson) kernel regression.
Syntax
NxKREG(X, Y, P, Kernel, H, Optimize, Target, Return)
- 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)).
- P
- is the polynomial order (0 = constant, 1 = linear, 2 = Quadratic, 3 = Cubic, etc.), etc.). If missing, P = 0.
- Kernel
- is the weighting kernel function used with KNN-Regression method : 0(or missing) = Uniform, 1 = Triangular, 2 = Epanechnikov, 3 = Quartic, 4 = Triweight, 5 = Tricube, 6 = Gaussian, 7 = Cosine, 8 = Logistic, 9 = Sigmoid, 10 = Silverman.
Value Kernel 0 Uniform Kernel (default). 1 Triangular Kernel. 2 Epanechnikov Kernel. 3 Quartic Kernel. 4 Triweight Kernel. 5 Tricube Kernel. 6 Gaussian Kernel. 7 Cosine Kernel. 8 Logistic Kernel. 9 Sigmoid Kernel. 10 Silverman Kernel. - H
- is the smoothing parameter (bandwidth) of the kernel density estimator. If missing, a default value of one(1) is assumed.
- Optimize
- is a flag (True/False) for searching and using optimal integer value K (i.e., number of data points). If missing or omitted, the argument value is assumed False.
- target
- is the desired x-value(s) to interpolate for (a single value or a one-dimensional array of cells (e.g., rows or columns)).
- Return
- is a number that determines the type of return value: 0 = Forecast (default), 1 = errors, 2 = Smoothing parameter (bandwidth), 3 = RMSE (CV). NxREG returns forecast/regression value(s) if missing or omitted.
Return Description 0 Forecast/Regression value(s) (default). 1 Forecast/Regression error(s). 2 Kernel Smoothing parameter (bandwidth). 3 RMSE (cross-validation).
Remarks
- The number of rows of the response variable (Y) must equal the number of rows of the explanatory variable (X).
- Observations (i.e., rows) with missing values in X or Y are removed.
- The NxKREG() function is available starting with version 1.66 PARSON.
Tutorial Video
Files Examples
Related Links
References
- Pagan, A.; Ullah, A. (1999). Nonparametric Econometrics. Cambridge University Press. ISBN 0-521-35564-8.
- Simonoff, Jeffrey S. (1996). Smoothing Methods in Statistics. Springer. ISBN 0-387-94716-7.
- Li, Qi; Racine, Jeffrey S. (2007). Nonparametric Econometrics: Theory and Practice. Princeton University Press. ISBN 0-691-12161-3.
- Henderson, Daniel J.; Parmeter, Christopher F. (2015). Applied Nonparametric Econometrics. Cambridge University Press. ISBN 978-1-107-01025-3.
Comments
Please sign in to leave a comment.