Kernel regression with a numerical response vector or matrix {Compositional}R Documentation

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".

Details

The Nadaraya-Watson estimator regression is applied.

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.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Wand M. P. and Jones M. C. (1994). Kernel smoothing. CRC press.

See Also

kernreg.tune, ice.kernreg, akern.reg, aknn.reg

Examples

y <- iris[, 1]
x <- iris[, 2:4]
est <- kern.reg(x, y, x, h = c(0.1, 0.2) )

[Package Compositional version 6.9 Index]