質問

I have estimated some data with 'density' and set the kernel as Epanechnikov, is there a inverse function that can retrieve me a value estimated to his original value?

set.seed(1)
data<-rnorm(518,10,3)
hist(data)


data_E<-density(data,bw="sj",kernel="epanechnikov")
hist(data_E$y)

k<-quantile(data_E$y, 0.95)
k

In the example above exposed, I have a sample size 518, from this I have estimated the density by the method of kernel (Epanechnikov), after this I would like to find the value of a certain element of this "new data" in terms of the "original data".

役に立ちましたか?

解決

No. You have removed information in the process of estimating the density. The density function does not store its input the way, for example, ecdf does.

Edit. I can perhaps soften that a bit. You could use the information in density to reconstruct a rough estimate of the original values. You would need to know the sample size, which which is recorded in the object returned, and then use the estimate to generate new data. Integrate the density, split the cumulative probability function equally along its range of support and you could construct an empiric quantile estimate.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top