Hello,

my name is Carsten. This ist my first post to R-help mailing list.

I estimate densities with the function "density" out of the package
"stats".

A simplified example:

        
        #generation of test data
        n=10
        z = rnorm(n)
        
        #density estimation
        f=density(z,kernel="epanechnikov",n=n)

        #evaluation
        print(f$y[5])

Here I can only evaluate the estimation at given points. These points
are determined by the parameter n. By default they are equidistant
distributed on the interesting interval.

But I need to evaluate the estimation (the estimated densitiy function)
at manually specified points. For example I want to compute f(z[i]).
This means I am interested in the estimated density at a the observation
z[i].

Does anyone know how I can compute this? I think this is an ordinary
task so I would be surprised if R can not manage this. But even after a
long search I have found nothing.

Thanks in advance

Carsten Harlaß

--
Carsten Harlaß
Aachen University of Applied Sciences
Campus Jülich
E-Mail: carsten_harl...@web.de

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to