Kernel regression with a numerical response vector or matrix: Kernel regression with a numerical response vector or matrix
Description
Kernel regression (Nadaraya-Watson estimator) with a numerical response vector or matrix.
Usage
kern.reg(xnew, y, x, h = seq(0.1, 1, length = 10), type = "gauss" )
Arguments
xnew
A matrix with the new predictor variables whose compositions are to be predicted.
y
A numerical vector or a matrix with the response value.
x
A matrix with the available predictor variables.
h
The bandwidth value(s) to consider.
type
The type of kernel to use, "gauss" or "laplace".
Value
The fitted values. If a single bandwidth is considered then this is a vector or a matrix, depeding on the nature of the response. If multiple bandwidth values are considered then this is a matrix, if the response is a vector, or a list, if the response is a matrix.
Details
The Nadaraya-Watson estimator regression is applied.
References
Wand M. P. and Jones M. C. (1994). Kernel smoothing. CRC press.