Ake-package {Ake} | R Documentation |
Associated kernel estimations
Description
Continuous and discrete estimation of density dke.fun
, probability mass function (p.m.f.) kpmfe.fun
and regression reg.fun
functions are performed using continuous and discrete associated kernels. The cross-validation technique hcvc.fun
, hcvreg.fun
and the Bayesian procedure hbay.fun
are also implemented for bandwidth selection.
Details
- The estimated density or p.m.f:
The associated kernel estimator
\widehat{f}_n
off
is defined as\widehat{f}_n(x) = \frac{1}{n}\sum_{i=1}^{n}{K_{x,h}(X_i)},
where
K_{x,h}
is one of the kernelskef
defined below. In practice, we first calculate the global normalizing constant{C}_n = \int_{x\in T}{\widehat{f}_n(x) \nu(dx)},
where
T
is the support of the density or p.m.f. function and\nu
is the Lebesgue or count measure onT
. For both continuous and discrete associated kernels, this normalizing constant is not generally equal to 1 and it will be computed. The represented density or p.m.f. estimate is then\tilde{f}_n=\widehat{f}_n/C_n
.For discrete data, the integrated squared error (ISE) defined by
{ISE}_0 = \sum_{x\in N}{{\{\tilde{f}_n(x)} - f_0(x)\}^2}
is the criteria used to measure the smoothness of the associated kernel estimator
\tilde{f}_n
with the empirical p.m.f.f_0
; see Kokonendji and Senga Kiessé (2011).
- The estimated regressor:
Both in continuous and discrete cases, considering the relation between a response variable
y
and an explanatory variablex
given byy=m(x)+\epsilon ,
where
m
is an unknown regession function onT
and\epsilon
the disturbance term with null mean and finite variance. Let(x_1,y_1),\ldots,(x_n,y_n)
be a sequence of independent and identically distributed (iid) random vectors onT\times R
withm(x)=E(y|x)
. The well-known Nadaraya-Watson estimator using associated kernels is\widehat{m}_n
defined as\widehat{m}_n(x) = \sum_{i=1}^{n}{\omega_{x}(X_i)Y_i},
where
\omega_{x}(X_i)=K_{x,h}(X_i)/\sum_{i=1}^{n}{K_{x,h}(X_i)}
andK_{x,h}
is one of the associated kernels defined below.Beside the criterion of kernel support, we retain the root mean squared error (RMSE) and also the practical coefficient of determination
R^2
defined respectively byRMSE = \sqrt{\frac{1}{n}\sum_{i=1}^{n}{\{y_i-\widehat{m}_n(x_i)\}^2}}
and
R^2=\frac{\sum_{i=1}^{n}{\{\widehat{m}_n(x_i)-\bar{y}\}^2}}{\sum_{i=1}^{n}(y_i-\bar{y})^2},
where
\bar{y}=n^{-1}(y_1+\ldots+y_n)
; see Kokonendji et al. (2009).
Given a data sample, the package allows to compute the density or p.m.f. and regression functions using one of the seven associated kernels: extended beta, lognormal, gamma, reciprocal inverse Gaussian for continuous data, DiracDU for categorical data, and binomial and discrete triangular for count data. The bandwidth parameter is computed using the cross-validation technique. When the associated kernel function is binomial, the bandwidth parameter is also computed using the local Bayesian procedure. The associated kernel functions are defined below. The first four kernels are for continuous data and the last three kernels are for discrete case.
- Extended beta kernel:
The extended beta kernel is defined on
{S}_{x,h,a,b}=[a,b]=T
witha<b<\infty
,x \in T
andh>0
:BE_{x,h,a,b}(y) = \frac {(y-a)^{(x-a)/\{(b-a)h\}}(b-y)^{(b-x)/\{(b-a)h\}}} {(b-a)^{1+h^{-1}}B\left(1+(x-a)/(b-a)h,1+(b-x)/(b-a)h\right)}1_{S_{x,h,a,b}}(y),
where
B(r,s)=\int_0^1 t^{r-1}(1-t)^{s-1}dt
is the usual beta function withr>0
,s>0
and1_A
denotes the indicator function of A. Fora=0
andb=1
, it corresponds to the beta kernel which is the probability density function of the beta distribution with shape parameters1+x/h
and(1-x)/h
; see Libengué (2013).- Gamma kernel:
The gamma kernel is defined on
{S}_{x,h}=[0, \infty)=T
withx \in T
andh>0
byGA_{x,h}(y) = \frac {y^{x/h}} {\Gamma(1+x/h)h^{1+x/h}}exp\left(-\frac{y}{h} \right)1_{S_{x,h}}(y),
where
\Gamma(z)=\int_0^\infty t^{z-1}e^{-t}dt
is the classical gamma function. The probability density functionGA_{x,h}
is the gamma distribution with scale parameter1+x/h
and shape parameterh
; see Chen (2000).- Lognormal kernel:
The lognormal kernel is defined on
{S}_{x,h}=[0,\infty)=T
withx \in T
andh>0
byLN_{x,h}(y) = \frac {1} {yh\sqrt{2\pi}}exp\left\{-\frac{1}{2}\left(\frac{1}{h}log(\frac{y}{x})-h \right)^{2}\right\}1_{S_{x,h}}(y).
It is the probability density function of the classical lognormal distribution with parameters
log(x)+h^{2}
andh
; see Libengué (2013).- Binomial kernel:
Let
x\in N:= \{0, 1, \ldots \}
and{S}_x = \{0, 1, \ldots, x + 1\}
. The Binomial kernel is defined on the support{S}_x
byB_{x,h}(y) = \frac {(x+1)!} {y!(x+1-y)!}\left(\frac{x+h}{x+1}\right)^y\left(\frac{1-h}{x+1}\right)^{(x+1-y)}1_{S_{x}}(y),
where
h\in(0, 1]
. Note thatB_{x,h}
is the p.m.f. of the binomial distribution with its number of trialsx+1
and its success probability(x+h)/(x+1)
; see Kokonendji and Senga Kiessé (2011).- Discrete triangular kernel:
For fixed arm
a\in N
, we define{S}_{x,a} = \{x-a,\ldots, x, \ldots, x + a\}
. The discrete triangular kernel is defined on{S}_{x,a}
byDT_{x,h;a}(y) = \frac {(a+1)^h - |y-x|^h} {P(a,h)}1_{S_{x,a}}(y),
where
x\in N
,h>0
andP(a,h)=(2a+1)(a+1)^h - 2(1+2^h+ \cdots +a^h)
is the normalizing constant. Fora=0
, the Discrete Triangular kernelDT_{x,h;0}
corresponds to the Dirac kernel onx
; see Kokonendji et al. (2007), and also Kokonendji and Zocchi (2010) for an asymmetric version of discrete triangular.- DiracDU kernel:
For fixed number of categories
c\in \{2,3,...\}
, we define{S}_{c} = \{0, 1, \ldots, c-1\}
. The DiracDU kernel is defined on{S}_{c}
byDU_{x,h;c}(y) = (1 - h)1_{\{x\}}(y)+\frac {h} {c-1}1_{S_{c}\setminus\{x\}}(y),
where
x\in {S}_{c}
andh\in(0, 1]
. See Kokonendji and Senga Kiessé (2011), and also Aitchison and Aitken (1976) for multivariate case.
Note that the global normalizing constant is 1 for DiracDU.
- The bandwidth selection:
Two functions are implemented to select the bandwidth: cross-validation and local Bayesian procedure. The cross-validation technique is used for all the associated kernels both in density and regression; see Kokonendji and Senga Kiessé (2011). The local Bayesian procedure is implemented to select the bandwidth in the estimation of p.m.f. when using binomial kernel; see Zougab et al. (2014).
In the coming versions of the package, adaptive Bayesian procedure will be included for bandwidth selection in density estimation when using gamma kernel. A global Bayesian procedure will also be implemented for bandwidth selection in regression when using binomial kernel.
Author(s)
W. E. Wansouwé, S. M. Somé and C. C. Kokonendji
Maintainer: W. E. Wansouwé <ericwansouwe@gmail.com>
References
Aitchison, J. and Aitken, C.G.G. (1976). Multivariate binary discrimination by the kernel method, Biometrika 63, 413 - 420.
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.
Igarashi, G. and Kakizawa, Y. (2015). Bias correction for some asymmetric kernel estimators, Journal of Statistical Planning and Inference 159, 37 - 63.
Kokonendji, C.C. and Senga Kiessé, T. (2011). Discrete associated kernel method and extensions, Statistical Methodology 8, 497 - 516.
Kokonendji, C.C., Senga Kiessé, T. and Demétrio, C.G.B. (2009). Appropriate kernel regression on a count explanatory variable and applications, Advances and Applications in Statistics 12, 99 - 125.
Libengue, 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.
Zougab, N., Adjabi, S. and Kokonendji, C.C. (2014). Bayesian approach in nonparametric count regression with binomial kernel, Communications in Statistics - Simulation and Computation 43, 1052 - 1063.