npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
betaKernelsBandwidth.hh File Reference

Optimal bandwidth for density estimation with beta kernels. More...

#include "npstat/stat/betaKernelsBandwidth.icc"

Go to the source code of this file.

Namespaces

 npstat
 

Functions

template<typename Real >
double npstat::betaKernelsBandwidth (double npoints, const Real *fvalues, unsigned long nValues, bool returnB2Star, double *expectedAmise=0)
 

Detailed Description

Optimal bandwidth for density estimation with beta kernels.

The formulae implemented in this code come from the paper by S.X. Chen, "Beta kernel estimators for density functions", Computational Statistics & Data Analysis 31, pp. 131-145 (1999). Note that printed versions of formulae for AMISE contain algebraic mistakes. These formulae have instead been rederived starting from equations 4.2 and 4.3 in the paper.

Bandwidth values returned by this function may not be optimal at all for finite samples as the precision of curve estimation by sums of beta functions drops very sharply as a function of derivative number (only the terms proportional to the first and the second derivatives are considered in the paper which is sufficient for asymptotic reasoning). Thus the returned bandwidth values should be used as an approximate guide only, perhaps as starting points for a cross validation bandwidth scan. Both b1* and b2* should be calculated – the difference between them gives an idea about potential spread of the optimal bandwidth.

Author: I. Volobouev

June 2013