TBuildKernel: Kernel estimator list constructor.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Given a sample X, builds the family of kernel estimators using generic function 'density'.

Usage

1
TBuildKernel(X, n = length(X), bwtab = NULL, kerneltab = NULL)

Arguments

X

numeric vector. The sample to build the kernel estimators.

n

size of the sample.

bwtab

numeric vector of bandwidths.

If NULL (default) bwtab = diff(range(X))/2/(ceiling(n/log(n)):1).

kerneltab

vector of kernel types. Should be available types of the generic function 'density'.

If NULL (default) kerneltab = "epanechnikov".

Details

We refer to the 'density' function in the 'stats' package for more details about the different options available.

Value

TBuildKernel returns a list with components

f

gives the explicit expression of the corresponding density function,

cuts

gives the vector of break points,

descript

list containing:

  • 'kernel'nature of the estimator,

  • kerneltype of kernel,

  • bwvalue of the bandwidth.

Author(s)

Nelo Magalhães and Yves Rozenholc.

References

'density' generic function in the 'stats' library: http://127.0.0.1:14946/library/stats/html/density.html

N. Magalhães and Y. Rozenholc, "A non-combinatorial algorithm for T-estimation", (2014).

See Also

DensityTestim, TBuildList, TBuildRegularHisto, TBuildIrregularHisto, TBuildParametric

Examples

1
2
3
4
5
6
## Not run: 
## build epanechnikov and triangular kernel estimators for a sample of the gamma density: 
## with parameters 2 and 3:
TBuildKernel(X=rgamma(1000,2,3),kerneltab=c('epanechnikov','triangular'))

## End(Not run)

Density.T.HoldOut documentation built on May 2, 2019, 2:32 a.m.