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,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,30 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,35 ,38 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,40 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,50 ,65) #'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: Write here your technical program description (don't use hard returns!) library(Hmisc) m <- mean(x) e <- median(x) postscript(file="/var/www/html/rcomp/tmp/16j3n1268571269.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=11.111111111111) op <- par(mfrow=c(2,1)) mydensity1 <- density(x,kernel='gaussian',na.rm=TRUE) plot(mydensity1,main='Density Plot - Gaussian Kernel',xlab='Median (0 -> full line) | Mean (0 -> dashed line)',ylab='density') abline(v=e,lty=1) abline(v=m,lty=5) grid() myseq <- seq(0.01, 0.99, 0.01) hd <- hdquantile(x, probs = myseq, se = TRUE, na.rm = FALSE, names = TRUE, weights=FALSE) plot(myseq,hd,col=2,main='Harrell-Davis Quantiles',xlab='quantiles',ylab='Median (0 -> full) | Mean (0 -> dashed)') abline(h=m,lty=5) abline(h=e,lty=1) grid() par(op) dev.off() #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab load(file="/var/www/html/rcomp/createtable") a<-table.start() a<-table.row.start(a) a<-table.element(a,'Median versus Mean',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'mean',header=TRUE) a<-table.element(a,mean(x)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'median',header=TRUE) a<-table.element(a,median(x)) a<-table.row.end(a) a<-table.end(a) table.save(a,file="/var/www/html/rcomp/tmp/2pbnq1268571269.tab") try(system("convert tmp/16j3n1268571269.ps tmp/16j3n1268571269.png",intern=TRUE))