## Kernel Density Series Transformation

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

diggetybo
Posts: 152
Joined: Mon Jun 23, 2014 12:04 am

### Kernel Density Series Transformation

If I have an existing series named x, and I want to store the kernel distribution of x in a series object named x_kernel, is there supported commands for this? The most common Epanechnikov formula would go something like:

Code: Select all

`series x_kernel = (3/4)*(1-x^2) ....?`

How can I implement the indicator function to truncate everything outside the domain [-1,1] to 0?

Please write the complete equation so I can see how you did it, thank you.

*Edit* On second thought, I guess I would need two series objects. One for the x values, and one for the y values.

EViews Glenn
EViews Developer
Posts: 2643
Joined: Wed Oct 15, 2008 9:17 am

### Re: Kernel Density Series Transformation

You can store the distribution, but not in series objects as the number of evaluation points for the kernel estimate does not in general correspond to the workfile frequency.

Use Proc/Make Distribution Plot Data... from the menus, or the .distdata proc to store the results in a matrix object.

paolo.zanghieri
Posts: 19
Joined: Wed Mar 05, 2014 10:52 am

### Re: Kernel Density Series Transformation

I have a similar problem. I want to rescale a series in the [0,1] interval using the percentiles of the kernel distribution. I guess I can do that with a long series of if, then else commands, but I wonder whether there is a quicker and more sensible way to do it. Thanks