bwchoice: Choice of bandwidth achieving a prescribed effective degree...

View source: R/bwchoice.R

bwchoiceR Documentation

Choice of bandwidth achieving a prescribed effective degree of freedom

Description

Perform a search for the bandwidths in the given grid. For each explanatory variable, the bandwidth is chosen such that the trace of the smoothing matrix according to that variable (effective degree of freedom) is equal to a prescribed value. This function is not intended to be used directly.

Usage

bwchoice(X,objectif,kernelx="g",itermax=1000)

Arguments

X

A matrix with n rows (individuals) and p columns (numeric variables).

objectif

A numeric vector of either length 1 or length equal to the number of columns of X. It indicates the desired effective degree of freedom (trace) of the smoothing matrix for each variable. objectif is repeated when the length of vector objectif is 1.

kernelx

String which allows to choose between gaussian kernel ("g"), Epanechnikov ("e"), uniform ("u"), quartic ("q").

itermax

A scalar which controls the number of iterations for that search.

Value

Returns a vector of length d, the number of explanatory variable, where each coordinate is the value of the selected bandwidth for each explanatory variable

Author(s)

Pierre-Andre Cornillon, Nicolas Hengartner and Eric Matzner-Lober.

See Also

ibr


ibr documentation built on Sept. 13, 2023, 5:08 p.m.