dke {Conake}R Documentation

Function for probability density estimation

Description

The function estimates the density in a single value or in a grid using discrete associated kernels. Four different associated kernels are available: extended beta, gamma, lognormal and reciprocal inverse Gaussian.

Usage

dke(vec_data, ker, bw, x = NULL,a=0,b=1)

Arguments

vec_data

The data sample.

ker

The associated kernel: "BE" extended beta, "GA" gamma, "LN" lognormal and "RIG" reciprocal inverse Gaussian.

bw

The bandwidth or smoothing parameter.

x

The single value or grid where estimation is computed

a

The left bound of the support used for extended beta kernel. Default value is 0 for beta kernel.

b

The right bound of the support used for extended beta kernel. Default value is 1 for beta kernel.

Details

The kernel estimator \widehat{f}_n of f is defined in the above sections. We recall that in general, the sum of the estimated values on the support is not equal to 1. In practice, we calculate the normalizing constant C_n before computing the estimated density \tilde{f}_n; see Libengué (2013) .

The bandwidth parameter in the function is obtained using the cross-validation technique for the four kernels.

Value

Returns a list containing:

C_n

The normalizing constant.

f_n

The values of the estimated function

Author(s)

W. E. Wansouwé, F.G. Libengué and C. C. Kokonendji

References

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.

Examples

## A sample data with n=100.
V<-rgamma(100,1.5,2.6)


##The bandwidth can be the one obtained by cross validation.
h<-0.052
## We choose Gamma kernel.

est<-dke(V,"GA",h)
est$f_n





[Package Conake version 1.0.1 Index]