Description Usage Arguments Details Value Author(s) References Examples

The function estimates the p.m.f. in a single value or in a grid using discrete associated kernels. Three different associated kernels are available: DiracDU (for categorical data), binomial and discrete triangular (for count data).

1 2 3 4 |

`Vec` |
the data sample from which the estimate is to be computed. |

`h` |
The bandwidth or smoothing parameter. The smoothing bandwidth to be used, can also be a character string giving a rule to choose the bandwidth. |

`type_data` |
The data sample type. Data type is "discrete" (categorical or count). |

`ker` |
The associated kernel: "dirDU" DiracDU,"bino" binomial, "triang" discrete triangular. |

`x` |
The points of the grid at which the density is to be estimated. |

`a` |
The arm in discrete triangular kernel. The default value is 1. |

`c` |
The number of categories in DiracDU. The default value is 2. |

`...` |
Further arguments. |

The associated 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 compute the global normalizing constant *C_n* before computing the estimated p.m.f. *\tilde{f}_n*; see Kokonendji and Senga Kiessé (2011).

The bandwidth parameter in the function is obtained using the cross-validation technique for the three associated kernels. For binomial kernel, the local Bayesian approach is also implemented and is recommanded to select the bandwidth; see Zougab et al. (2012).

Returns a list containing:

`data ` |
The number of observations. |

`n ` |
The number of observations. |

`eval.points` |
The support of the estimated p.m.f. |

`h ` |
The bandwidth |

`C_n ` |
The global normalizing constant. |

`ISE_0 ` |
The integrated square error. |

`f_0 ` |
A vector of (x,f0(x)). |

`f_n ` |
A vector of (x,fn(x)). |

`f0 ` |
The empirical p.m.f. |

`est.fn ` |
The estimated p.m.f. containing estimated values after normalization. |

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

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 Zocchi, S.S. (2007). Discrete triangular distributions and non-parametric estimation for
probability mass function.
*Journal of Nonparametric Statistics* **19**, 241 - 254.

Zougab, N., Adjabi, S. and Kokonendji, C.C. (2012). Binomial kernel and Bayes local bandwidth in discrete functions estimation.
*Journal of Nonparametric Statistics* **24**, 783 - 795.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## A sample data with n=60.
V<-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)
##The bandwidth can be the one obtained by cross validation.
h<-0.081
## We choose Binomial kernel.
est<-kpmfe.fun(Vec=V,h,"discrete","bino")
##To obtain the normalizing constant:
est
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.