多谢。
帮助里的:The kernels are scaled such that this is the standard deviation of the smoothing kernel.
从这句话,暂且把它理解为这个bw的单位是标准差,bw=1表示带宽为1*sd(x)。
用三角形核函数试验的结果是如此
x<-c(1,2,4,7)
densityplot(x,bw=1/sd(x),kernel="triangular",main="bw=1",xlab="x")
但还有一个小问题是:用kernel="rectangular"得出的结果却不太像1。不知道是数据少,精度低,还是需要的不是sd(x),而是sqrt((n-1)/n)*sd(x) 。或者是我对rectangular的理解有些问题。