The kernel_density command performs kernel density estimation (KDE)1 kernel_density takes a sample, optionally restricted to an interval [a,b], and obtains an estimate f of the (unknown) probability density function f from which the samples are drawn. The function f is defined by:
f(x)= |
|
| K | ⎛ ⎜ ⎜ ⎝ |
| ⎞ ⎟ ⎟ ⎠ | , (13) |
where K is the Gaussian kernel
K(u)= |
| exp | ⎛ ⎜ ⎜ ⎝ | − |
| u2 | ⎞ ⎟ ⎟ ⎠ |
and h is the positive real parameter called the bandwidth.
kde is a synonym for kernel_density.
Examples.
|
0.14655478136 |
⎡ ⎣ | 0.17,0.1653323 | ⎤ ⎦ |
0.0269841239243 |
0.0144212781377 |