Learn R Programming

SurrogateParadoxTest (version 2.0)

smoother_fitter: Helper function

Description

Nadaraya-Watson kernel smoother

Usage

smoother_fitter(X, Y, kernel = gaussian_kernel, h)

Value

Returns a function which is the smoothed function; input takes in an x value.

Arguments

X

Vector of X values

Y

Vector of Y values

kernel

Kernel to use in the kernel smoother; defaults to Gaussian kernel

h

Bandwidth

Author

Emily Hsiao