search for: fker

Displaying 1 result from an estimated 1 matches for "fker".

Did you mean: fer
2002 Jun 28
1
integrate function fails! (PR#1718)
...nium Submission from: (NULL) (158.49.28.155) Dear reader: I was trying to evaluate the L2 error produced when estimating the density function N(0,1) from a sample of size 100 using a kernel density estimate. It produced a strange value. You can reproduce the process by typing samp<-rnorm(100) fker<-function(x,h){sum(dnorm((rep(x,100)-samp)/h))/(100*h)} integrand<-function(x){(fker(x,5)-dnorm(x))^2} err<-integrate(integrand,-Inf,Inf) This value err of the L2 error is generally far from accurate. fker is the kernel density estimate with bandwidth h and Gaussian kernel. Obviously, h=5...