R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(-10.513,-8.513,-17.783,-12.875,-18.691,-18.053,-20.961,-29.323,-44.139,-42.139,-42.777,-36.685,-39.323,-43.047,-42.593,-49.409,-47.139,-27.145,-25.691,-20.967,-15.605,-19.513,-14.059,-2.427,7.205,30.285,56.003,20.107,13.475,10.205,10.205,2.751,6.751,5.659,24.291,11.021,10.021,11.021,11.929,24.015,32.923,36.193,37.463,29.285,28.739,30.739,38.009,28.831,24.107,49.641,30.831,23.469,16.745,20.291,20.199,25.561,26.015,14.475,16.837,12.475,18.383,29.469,26.015,30.469,28.015,31.561,21.291,21.291,33.739,34.285,31.831,25.015,18.561,18.653,18.561,21.745,10.659,6.659,15.837,8.113,9.475,7.659,8.113,-7.973,-5.519,-13.243,-16.789,26.469,-4.611,-7.881,-7.427,-26.059,-10.789,-12.789,-12.881,-20.151,-21.605,-27.421,-31.059,-33.875,-33.967,-42.237,-45.145,-36.513,-24.243,-29.151,-16.519,-11.703,-4.703,18.377,38.641,50.273,61.635,65.905,61.997,57.997,58.543,62.089,55.273,46.641,47.641) > par2 = '36' > par1 = '0' > #'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!) > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > x <- as.ts(x) > library(lattice) > postscript(file="/var/www/html/rcomp/tmp/1nx041257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x,type='l',main='Run Sequence Plot',xlab='time or index',ylab='value') > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/28r611257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(x) > grid() > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3nanc1257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if (par1 > 0) + { + densityplot(~x,col='black',main=paste('Density Plot bw = ',par1),bw=par1) + } else { + densityplot(~x,col='black',main='Density Plot') + } > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/48c7s1257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(x) > qqline(x) > grid() > dev.off() null device 1 > if (par2 > 0) + { + postscript(file="/var/www/html/rcomp/tmp/5iose1257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + dum <- cbind(lag(x,k=1),x) + dum + dum1 <- dum[2:length(x),] + dum1 + z <- as.data.frame(dum1) + z + plot(z,main='Lag plot (k=1), lowess, and regression line') + lines(lowess(z)) + abline(lm(z)) + dev.off() + if (par2 > 1) { + postscript(file="/var/www/html/rcomp/tmp/6bb7s1257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + dum <- cbind(lag(x,k=par2),x) + dum + dum1 <- dum[(par2+1):length(x),] + dum1 + z <- as.data.frame(dum1) + z + mylagtitle <- 'Lag plot (k=' + mylagtitle <- paste(mylagtitle,par2,sep='') + mylagtitle <- paste(mylagtitle,'), and lowess',sep='') + plot(z,main=mylagtitle) + lines(lowess(z)) + dev.off() + } + postscript(file="/var/www/html/rcomp/tmp/7di3t1257419026.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + acf(x,lag.max=par2,main='Autocorrelation Function') + grid() + dev.off() + } null device 1 > summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. -49.410 -16.790 10.200 6.372 26.470 65.900 > > #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,'Descriptive Statistics',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'# observations',header=TRUE) > a<-table.element(a,length(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'minimum',header=TRUE) > a<-table.element(a,min(x)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Q1',header=TRUE) > a<-table.element(a,quantile(x,0.25)) > 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.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,'Q3',header=TRUE) > a<-table.element(a,quantile(x,0.75)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'maximum',header=TRUE) > a<-table.element(a,max(x)) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/8msa91257419027.tab") > > system("convert tmp/1nx041257419026.ps tmp/1nx041257419026.png") > system("convert tmp/28r611257419026.ps tmp/28r611257419026.png") > system("convert tmp/3nanc1257419026.ps tmp/3nanc1257419026.png") > system("convert tmp/48c7s1257419026.ps tmp/48c7s1257419026.png") > system("convert tmp/5iose1257419026.ps tmp/5iose1257419026.png") > system("convert tmp/6bb7s1257419026.ps tmp/6bb7s1257419026.png") > system("convert tmp/7di3t1257419026.ps tmp/7di3t1257419026.png") > > > proc.time() user system elapsed 1.467 1.044 3.310