1.目前我安装的是s-plus,s-plus的bandwidth methods有
histogram bin (hb)
normal reference density (nrd)
biased cross-validation (bcv)
unbiased cross-validation (ucv)
Sheather & Jones pilot estimation of derivatives (sj).
选择方式如下:
fit=density(x,width="nrd",window="gaussian",n=81,from=-4,to=4)
2.下面两段会接近,但不会完全相同.
xdensity1=density(x,n=81,width=0.4544,from=-4,to=4,cut=o.75)
xdensity1$y
xdensity2=density.lf(x,n=81,width=0.4544,from=-4,to=4,deg=0,cut=0.75)
xdensity2$y
毕竟function density与density.lf并不相同.