Skip to main content

StatsKDE

StatsKDE [flags] srcWave

StatsKDE can be used to estimate a PDF from original data distribution. Unlike histograms, this method produces a smooth result as it constructs the PDF from a normalized superposition of kernel functions.

The StatsKDE operation was added in Igor Pro 7.00.

Flags

/BWM=mSets the bandwidth selection method.
m =0:User-specified via /H flag
m =1:Silverman
m =2:Scott
m =3:Bowmann and Azzalini
/DEST=destWave
Specifies the output destination. Creates a real wave reference for the destination wave in a user function. See Automatic Creation of WAVE References for details.
/FREEMakes the destination wave (specified by /DEST) a free wave.
/H=bwSpecifies a fixed user-defined bandwidth.
/KT=kernelSpecifies the kernel type.
kernel =1:Epanechnikov
kernel =2:Bi-weight
kernel =3:Tri-weight
kernel =4:Triangular
kernel =5:Gaussian
kernel =6:Rectangular
/QNo results printed in the history area. In the case of univariate KDE this flags suppresses the printing of the bandwidth value.
/S={x0,dx,xn}Specifies the range of the output starting from x=x0 to x=xn in increments of dx .
/ZIgnores errors. V_flag is set to zero if there are no errors.

Details

StatsKDE estimates the PDF of a distribution of values using a smoothing kernel and a bandwidth parameter which affects the degree of smoothing.

Theory suggests that the Epanechnikov kernel is the most efficient but many expressions for the optimal bandwidth are derived for the Gaussian kernel. If srcWave contains N points and the requested output (/S flag) has M points then the computational complexity is O(NM). For large problems it may be beneficial to use the Gaussian kernel via the FastGaussTransform operation.

References

Wand M.P. and Jones M.C. (1995) Monographs on Statistics and Applied Probability, London: Chapman and Hall

Bowman, A.W., and Azzalini, A. (1997), Applied Smoothing Techniques for Data Analysis, London: Oxford University Press.

See Also

Statistical Analysis, Histogram, FastGaussTransform