R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(3.594 + ,3.617 + ,3.647 + ,3.761 + ,3.767 + ,3.692 + ,3.709 + ,3.716 + ,3.755 + ,3.702 + ,3.698 + ,3.765 + ,3.809 + ,3.777 + ,3.747 + ,3.695 + ,3.719 + ,3.714 + ,3.740 + ,3.632 + ,3.643 + ,3.615 + ,3.747 + ,3.687 + ,3.700 + ,3.578 + ,3.608 + ,3.711 + ,3.599 + ,3.721 + ,3.683 + ,3.668 + ,3.715 + ,3.673 + ,3.701 + ,3.846 + ,3.853 + ,3.807 + ,3.860 + ,3.854 + ,3.842 + ,3.826 + ,3.863 + ,3.763 + ,3.789 + ,3.822 + ,3.877 + ,3.867 + ,3.940 + ,3.864 + ,3.859 + ,3.868 + ,3.887 + ,3.908 + ,3.936 + ,3.891 + ,3.962 + ,3.947 + ,3.909 + ,3.897 + ,3.878 + ,3.841 + ,3.841 + ,3.842 + ,3.836 + ,3.821 + ,3.815 + ,3.805 + ,3.815 + ,3.803 + ,3.722 + ,3.745 + ,3.681 + ,3.684 + ,3.676 + ,3.725 + ,3.734 + ,3.747 + ,3.683 + ,3.715 + ,3.717 + ,3.772 + ,3.655 + ,3.615 + ,3.634 + ,3.540 + ,3.580 + ,3.598 + ,3.577 + ,3.568 + ,3.493 + ,3.446 + ,3.376 + ,3.345 + ,3.336 + ,3.341 + ,3.196 + ,3.191 + ,3.157 + ,3.111 + ,3.054 + ,3.109 + ,3.041 + ,3.017 + ,3.045 + ,3.037 + ,3.043 + ,2.992 + ,2.946 + ,2.883 + ,2.988 + ,2.950 + ,3.054 + ,3.083 + ,3.125 + ,3.175 + ,3.066 + ,3.054 + ,2.969 + ,3.007 + ,3.021 + ,2.982 + ,2.987 + ,2.964 + ,3.084 + ,3.060 + ,3.026 + ,3.083 + ,3.089 + ,3.090 + ,3.065 + ,3.072 + ,3.070 + ,3.057 + ,3.009 + ,2.990 + ,2.984 + ,3.014 + ,2.987 + ,3.025 + ,3.030 + ,3.097 + ,3.118 + ,3.153 + ,3.189 + ,3.173 + ,3.044 + ,3.148 + ,3.123 + ,3.092 + ,3.051 + ,3.054 + ,2.995 + ,2.942 + ,2.957 + ,2.772 + ,2.984 + ,3.060 + ,2.943 + ,2.914 + ,2.869 + ,2.879 + ,2.783 + ,2.473 + ,2.728 + ,2.735 + ,2.743 + ,2.638 + ,2.616 + ,2.380 + ,2.354 + ,2.095 + ,2.248 + ,2.443 + ,2.183 + ,1.978 + ,2.040 + ,2.079 + ,2.155 + ,2.052 + ,1.983 + ,1.908 + ,1.861 + ,1.895 + ,2.002 + ,2.091 + ,2.033 + ,2.132 + ,2.170 + ,2.239 + ,2.162 + ,2.130 + ,2.202 + ,2.171 + ,2.168 + ,2.032 + ,2.125 + ,2.070 + ,2.033 + ,2.042 + ,1.899 + ,1.873 + ,1.805 + ,1.819 + ,1.843 + ,1.839 + ,1.875 + ,1.879 + ,1.764 + ,1.834 + ,1.847 + ,1.835 + ,1.874 + ,1.882 + ,1.885 + ,1.904 + ,1.819 + ,1.874 + ,1.863 + ,1.887 + ,1.861 + ,1.884 + ,1.865 + ,1.853 + ,1.861 + ,1.870 + ,1.899 + ,1.916 + ,1.941 + ,2.003 + ,2.008 + ,1.991 + ,1.975 + ,1.980 + ,1.974 + ,1.973 + ,1.982 + ,1.886 + ,1.884 + ,1.884 + ,1.848 + ,1.782 + ,1.838 + ,1.814 + ,1.846 + ,1.893 + ,1.894 + ,1.929 + ,1.887 + ,1.896 + ,1.869 + ,1.897 + ,1.879 + ,1.919) > par1 = '0' > ylab = 'WAARDE AANDEEL BEL20' > xlab = 'TIJD IN WERKDAGEN' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: > if (par1 == '0') bw <- 'nrd0' > if (par1 != '0') bw <- as.numeric(par1) > postscript(file="/var/www/html/freestat/rcomp/tmp/1aipt1235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity1<-density(x,bw=bw,kernel='gaussian',na.rm=TRUE) > plot(mydensity1,main='Gaussian Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > mydensity1 Call: density.default(x = x, bw = bw, kernel = "gaussian", na.rm = TRUE) Data: x (254 obs.); Bandwidth 'bw' = 0.2253 x y Min. :1.088 Min. :0.000862 1st Qu.:1.976 1st Qu.:0.122353 Median :2.863 Median :0.302219 Mean :2.863 Mean :0.281390 3rd Qu.:3.750 3rd Qu.:0.445975 Max. :4.638 Max. :0.588470 > postscript(file="/var/www/html/freestat/rcomp/tmp/22dd41235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity2<-density(x,bw=bw,kernel='epanechnikov',na.rm=TRUE) > plot(mydensity2,main='Epanechnikov Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3755h1235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity3<-density(x,bw=bw,kernel='rectangular',na.rm=TRUE) > plot(mydensity3,main='Rectangular Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/4zzpp1235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity4<-density(x,bw=bw,kernel='triangular',na.rm=TRUE) > plot(mydensity4,main='Triangular Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/5zov51235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity5<-density(x,bw=bw,kernel='biweight',na.rm=TRUE) > plot(mydensity5,main='Biweight Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/66f0j1235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity6<-density(x,bw=bw,kernel='cosine',na.rm=TRUE) > plot(mydensity6,main='Cosine Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/7i1ei1235901984.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > mydensity7<-density(x,bw=bw,kernel='optcosine',na.rm=TRUE) > plot(mydensity7,main='Optcosine Kernel',xlab=xlab,ylab=ylab) > grid() > dev.off() null device 1 > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Properties of Density Trace',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Bandwidth',header=TRUE) > a<-table.element(a,mydensity1$bw) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'#Observations',header=TRUE) > a<-table.element(a,mydensity1$n) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/8rtl41235901984.tab") > > system("convert tmp/1aipt1235901984.ps tmp/1aipt1235901984.png") > system("convert tmp/22dd41235901984.ps tmp/22dd41235901984.png") > system("convert tmp/3755h1235901984.ps tmp/3755h1235901984.png") > system("convert tmp/4zzpp1235901984.ps tmp/4zzpp1235901984.png") > system("convert tmp/5zov51235901984.ps tmp/5zov51235901984.png") > system("convert tmp/66f0j1235901984.ps tmp/66f0j1235901984.png") > system("convert tmp/7i1ei1235901984.ps tmp/7i1ei1235901984.png") > > > proc.time() user system elapsed 2.212 1.835 2.523