| Library: | pp |
| See also: | plotgt indexfriedmantukey indexentropy indexhermite indexnaturalhermite |
| Quantlet: | indexlegendre | |
| Description: | computes the Legendre index via kernel density estimation |
| Usage: | ind = indexlegendre (x, h) | |
| Input: | ||
| px | n x p matrix | |
| h | 1 x p matrix bandwidth | |
| Output: | ||
| ind | scalar | |
; loads the library pp
library ("pp")
; initialize random generator
randomize(0)
; generate a dataset with mean(x)=0 and cov(x)=I_2
x = normal(922,2)
; compute the index with rule-of-thumb bandwidth
indexlegendre(x, 1~1)
Content of object ind [1,] 0.000029
| Library: | pp |
| See also: | plotgt indexfriedmantukey indexentropy indexhermite indexnaturalhermite |