lambdachoice: Choice of bandwidth according to a given effective degree of...

View source: R/lambdachoice.R

lambdachoiceR Documentation

Choice of bandwidth according to a given effective degree of freedom

Description

Perform a search for the different 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 given value. This function is not intended to be used directly.

Usage

lambdachoice(X,ddlobjectif,m=2,s=0,itermax,smoother="tps")

Arguments

X

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

ddlobjectif

A numeric vector of length 1 which indicates the desired effective degree of freedom (trace) of the smoothing matrix for thin plate splines of order m.

m

The order of derivatives for the penalty (for thin plate splines it is the order). This integer m must verify 2m+2s/d>1, where d is the number of explanatory variables.

s

The power of weighting function. For thin plate splines s is equal to 0. This real must be strictly smaller than d/2 (where d is the number of explanatory variables) and must verify 2m+2s/d. To get pseudo-cubic splines, choose m=2 and s=(d-1)/2 (See Duchon, 1977).

itermax

A scalar which controls the number of iterations for that search

smoother

Character string which allows to choose between thin plate splines "tps" or Duchon splines "tps" (see Duchon, 1977).

Value

Returns the coefficient lambda that control smoothness for the desired effective degree of freedom

Author(s)

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

References

Duchon, J. (1977) Splines minimizing rotation-invariant semi-norms in Solobev spaces. in W. Shemp and K. Zeller (eds) Construction theory of functions of several variables, 85-100, Springer, Berlin.

See Also

ibr


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