hcvd.fun: Cross-validation function for bandwidth selection in p.m.f....

View source: R/hcvd.fun.R

hcvd.funR Documentation

Cross-validation function for bandwidth selection in p.m.f. estimation

Description

The (S3) generic function hcvd.fun computes the cross-validation bandwidth selector in p.m.f. estimation.

Usage

hcvd.fun(Vec, ...)
## Default S3 method:
hcvd.fun(Vec, seq_bws = NULL, ker = c("bino", "triang", "dirDU"), a = 1, c = 2,...)

Arguments

Vec

The data sample from which the estimate is to be computed.

seq_bws

The sequence of bandwidths where to compute the cross-validation. Default value is NULL.

ker

The associated kernel

a

The arm of the discrete triangular kernel. Default value is 1.

c

The number of categories in DiracDU kernel.Default value is 2.

...

Further arguments.

Details

The hcvd.fun function implements the choice of the bandwidth h using the cross-validation approach in p.m.f. estimate.

Value

Returns a list containing:

hcv

The optimal bandwidth parameter.

CV

The cross-validation function values.

seq_h

The sequence of bandwidths where the cross-validation is computed.

Author(s)

W. E. Wansouwé, S. M. Somé and C. C. Kokonendji

References

Chen, S. X. (1999). Beta kernels estimators for density functions, Computational Statistics and Data Analysis 31, 131 - 145.

Chen, S. X. (2000). Probability density function estimation using gamma kernels, Annals of the Institute of Statistical Mathematics 52, 471 - 480.

Libengué, F.G. (2013). Méthode Non-Paramétrique par Noyaux Associés Mixtes et Applications, Ph.D. Thesis Manuscript (in French) to Université de Franche-Comté, Besançon, France and Université de Ouagadougou, Burkina Faso, June 2013, LMB no. 14334, Besançon.

Igarashi, G. and Kakizawa, Y. (2015). Bias correction for some asymmetric kernel estimators, Journal of Statistical Planning and Inference 159, 37 - 63.

Examples

## Data can be simulated data or real data
## We use real data 
## and then compute the cross validation. 
Vec<-c(10,0,1,0,4,0,6,0,0,0,1,1,1,2,4,4,5,6,6,6,6,7,1,7,0,7,7,
7,8,0,8,12,8,8,9,9,0,9,9,10,10,10,10,0,10,10,11,12,12,10,12,12,
13,14,15,16,16,17,0,12)
## Not run: 
CV<-hcvd.fun(Vec,NULL,"bino")
CV$hcv

## End(Not run)
##The cross validation function can be also ploted.
## Not run: 
plot.fun(CV$seq_bws,CV$CV, type="l")

## End(Not run)


Ake documentation built on June 13, 2022, 5:07 p.m.