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(-22.730,-16.730,-8.595,-8.449,-7.741,-6.460,-1.606,0.675,6.383,11.383,9.102,7.956,-1.325,3.237,4.810,7.518,7.383,-9.314,-10.741,-17.303,-15.584,-14.730,-17.157,-25.573,-35.989,-56.529,-64.788,-37.540,-24.124,-19.989,-16.989,-20.562,-17.562,-18.416,-26.832,-29.697,-28.697,-26.697,-26.551,-37.394,-46.248,-51.383,-62.518,-42.529,-35.956,-40.956,-46.091,-41.102,-30.540,-50.507,-31.102,-29.821,-23.259,-19.832,-22.686,-26.967,-31.394,-19.124,-29.405,-24.124,-25.978,-36.821,-35.394,-33.821,-33.394,-30.967,-24.832,-31.832,-46.956,-47.529,-49.102,-42.394,-51.967,-38.113,-38.967,-33.259,-26.416,-27.416,-33.405,-30.843,-32.124,-26.416,-23.843,-25.000,-23.427,-14.865,-16.292,-36.821,-22.281,-19.146,-22.573,-12.157,-16.292,-15.292,-19.146,-27.011,-26.584,-23.876,-38.157,-30.449,-33.303,-27.168,-24.314,-32.730,-40.865,-45.011,-51.427,-43.135,-41.135,-52.675,-59.507,-65.923,-58.204,-66.339,-64.485,-53.485,-50.058,-47.631,-44.923,-30.507,-31.507) > 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/1kmyd1257418275.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/2vk161257418275.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/3byzg1257418275.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/4vho11257418275.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/5en6d1257418275.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/64ctv1257418275.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/7ykvn1257418275.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. -66.34 -38.97 -27.42 -28.72 -19.12 11.38 > > #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/8vz9n1257418275.tab") > > system("convert tmp/1kmyd1257418275.ps tmp/1kmyd1257418275.png") > system("convert tmp/2vk161257418275.ps tmp/2vk161257418275.png") > system("convert tmp/3byzg1257418275.ps tmp/3byzg1257418275.png") > system("convert tmp/4vho11257418275.ps tmp/4vho11257418275.png") > system("convert tmp/5en6d1257418275.ps tmp/5en6d1257418275.png") > system("convert tmp/64ctv1257418275.ps tmp/64ctv1257418275.png") > system("convert tmp/7ykvn1257418275.ps tmp/7ykvn1257418275.png") > > > proc.time() user system elapsed 1.448 1.035 3.095