[Gretl-users] on kernel density

Sven Schreiber svetosch at gmx.net
Tue Jan 28 08:38:12 EST 2014


Am 28.01.2014 13:51, schrieb Leandro Zipitria:
> Dear Gretl users,
>
> I am trying to run a kernel approximation to a series of data
> (attached), using the command kdensity as show in the manual.
>
> Specifically, the inp is as follows:
>
> matrix d = kdensity(Water)
> gnuplot --matrix=d --with-lines --output=pruba.eps
>
> But, once run the output says that the second column has non finite
> values. Maybe is because values are integers, but I have checked on
> Stata (sorry, a friend of mine, I do not use it), and the kernel density
> flows without problems.

Problem confirmed on latest Win snapshot. Don't apologize for 
cross-checking with other software! This is useful.

>
> Is this a problem of the data, or I am doing something wrong?
>

Well the data *are* weird for plugging into a smooth density estimate, 
but that's not the point here. This should work I guess.

Interestingly, if you replace Water with zeromiss(Water), then it works. 
Typically the result will not be what you intended, though. (Or are the 
zeroes actually missing values?)

-sven





More information about the Gretl-users mailing list