Dataplot Vol 1 Vol 2

# KERNEL DENSITY POINTS

Name:
KERNEL DENSITY POINTS
Type:
Support Command
Purpose:
Specify the number of points for the density curve for the KERNEL DENSITY PLOT command.
Description:
The kernel density estimate, fn, of a set of n points from a density f is defined as:

$$f_n(x) = \frac{\sum_{j=1}^{n}{K\{\frac{(x - X_j)}{h}\}}} {nh}$$

where K is the kernel function h is the smoothing parameter or window width.

This command sets the number of points at which the kernel density estimate is computed.

In particular, the horizontal points for the kernel density plot are computed at:

DLO + (I - 0.5)*(DHI - DLO)/NKD

where

 DLO = YMINIMUM - 3*H where YMINIMUM is the minimum of the raw data and H is the window width NKD = the number of points at which the kernel density is estimated DHI = YMAXIMUM + 3*H where YMAXIMUM is the maximum of the raw data and H is the window width I = i-th point in the density estimate

By default, the density curve is generated with 256 points. The underlying FFT computation expects this number to be a power of 2 (i.e., 2K). Currently, Dataplot limits this value to 2K where K is an integer between 5 (= 32 points) and 11 (2,048) points. Values below 32 are set to 32, values greater than 2,048 are set to 2,048 and values between 32 and 2,048 are rounded up to the next value of 2K (i.e., 32, 64, 128, 256, 512, 1024, or 2048).

Syntax:
KERNEL DENSITY POINTS <value>
where <value> is a number or parameter that specifies the desired number of points.
Examples:
KERNEL DENSITY POINTS 1024
KERNEL DENSITY POINTS 512
KERNEL DENSITY POINTS 2048
Default:
The default number of points is 256.
Synonyms:
The following are synonyms for the KERNEL DENSITY POINTS command:

KERNEL POINTS KERNEL NUMBER OF POINTS KERNEL NUMBER POINTS KERNEL DENSITY NUMBER OF POINTS KERNEL DENSITY NUMBER POINTS
Related Commands:
 KERNEL DENSITY PLOT = Generate a kernel density plot command. KERNEL DENSITY WIDTH = Sets the window width for the kernel density plot.
Reference:
B. W. Silverman (1982), "Kernel Density Estimation using the Fast Fourier Transform," Applied Statistics, Royal Statistical Society, Vol. 33.
Applications:
Density Estimation
Implementation Date:
2001/8
Program:
LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 10000
.
MULTIPLOT 2 2
MULTIPLOT CORNER COORDINATES 2 2
MULTIPLOT SCALE FACTOR 2
.
KERNEL DENSITY POINTS 64
X3LABEL DENSITY WITH 64 POINTS
KERNEL DENSITY PLOT Y
.
KERNEL DENSITY POINTS 256
X3LABEL DENSITY WITH 256 POINTS
KERNEL DENSITY PLOT Y
.
KERNEL DENSITY POINTS 512
X3LABEL DENSITY WITH 512 POINTS
KERNEL DENSITY PLOT Y
.
KERNEL DENSITY POINTS 1024
X3LABEL DENSITY WITH 1,024 POINTS
KERNEL DENSITY PLOT Y
.
END OF MULTIPLOT

NIST is an agency of the U.S. Commerce Department.

Date created: 8/14/2001
Last updated: 10/30/2015