Keywords: KernelDensityEstimator.png en Dotplot Histogramm and Kernel density estimators of a variable own Sigbert 2010-06-22 The R program to create the PNG file library np library mlbench data BostonHousing s <- sort BostonHousing 13 index return T x <- BostonHousings ix 13 r <- -0 01 runif length x -0 005 png D13 png width 640 height 480 hist x freq FALSE ylim c -0 015 0 07 col gray xlab Anteil der Unterschichtbevölkerung pro Bezirk in ylab Dichte main Dotplot Histogramm und Kerndichteschätzer d1<-npudens x bws 1 5 lines x fitted d1 col red lwd 2 d2<-npudens x bws 1 lines x fitted d2 col blue lwd 2 d3<-npudens x bws 0 5 lines x fitted d3 col green lwd 2 points x r cex 0 5 legend topright legend c h 1 5 h 1 0 h 0 5 col c red blue green lwd 2 lty 1 title Kerndichteschätzer dev off Created with R Kernel density estimation |