NW.loocv: LOO-CV for h in Nadaraya–Watson kernel regression.

View source: R/Utils.Estimates.R

NW.loocvR Documentation

LOO-CV for h in Nadaraya–Watson kernel regression.

Description

LOO-CV for h in Nadaraya–Watson kernel regression.

Usage

NW.loocv(y, x, kernel = "unif")

Arguments

y

A dependent variable.

x

An explanatory variable.

kernel

Needed kernel, currently only unif and gauss:

  • unif: K(x) = \left\{\begin{array}{ll} 1 & \frac{|x - x_i|}{h} \leq 1 \\ 0 & \textrm{otherwize} \end{array}\right.

  • gauss: \Phi(\frac{x - x_i}{h})

Value

A list of arguments as well as the estimated bandwidth h.

References

Harvey, David I., S. Leybourne, Stephen J., and Yang Zu. “Nonparametric Estimation of the Variance Function in an Explosive Autoregression Model.” School of Economics. University of Nottingham, 2022.


d9d6ka/RANEPA-R documentation built on May 4, 2024, 7:11 a.m.