[R] kernel density estimates

David Winsemius dwinsemius at comcast.net
Sat Aug 22 16:08:30 CEST 2009


On Aug 22, 2009, at 9:44 AM, maram salem wrote:

> Dear All,
> I have a variable q which is a vector of 1000 simulated positive  
> values; that is I generated 1000 samples from the pareto  
> distribution, from each sample I calculated the value of q ( a  
> certain fn in the sample observations), and thus I was left with  
> 1000 values of q and I don't know the distribution of q.
>
> Hence, I used the given code for kernel density estimation to  
> estimate the density of q
>
>  >options(scipen=4)
>> d <- density(q, bw = "nrd0",kernel="gaussian")
>> d
>> plot(d)
>
>
> But what I'm really intersed in is to estimate the probability that  
> q is greater than a certain value , for ex.,P(q>11000), using the  
> kernel density estimate I obtained.
>  Could u help me with a fn or some document to do this?
> Thank u so much
>

I do not understand why you think that creating a density estimate is  
needed or even useful for the purpose. Why would you not simply  
compute the Pr(q > 11000) on the original sample?

-- 

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list