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(1.8788,1.6410,1.3778,1.3913,1.4222,1.5333,1.4082,1.3000,1.0370,0.9831,0.9138,1.1071,1.1458,1.2000,1.1346,1.0943,0.9636,1.3256,1.3571,1.3947,1.3171,1.2927,1.4615,1.6765,2.0370,3.2667,3.5714,1.5806,1.3171,1.3488,1.2609,1.2381,1.2444,1.1556,1.4750,1.5143,1.4444,1.3947,1.3077,1.5625,2.3333,2.4762,3.8333,1.6552,1.2778,1.5484,1.7143,1.6333,1.3947,1.7778,1.2750,1.2000,1.1364,1.1702,1.1556,1.2619,1.3684,1.1957,1.4324,1.2927,1.4000,1.6364,1.5294,1.5278,1.5000,1.5526,1.3333,1.6000,2.0400,2.2083,2.3636,1.8889,2.7059,1.6333,1.5333,1.6176,1.5405,1.4722,1.5758,1.6061,1.5152,1.4595,1.3250,1.4286,1.3784,1.2093,1.1190,1.5455,1.2564,1.3250,1.4054,1.0227,1.2619,1.1860,1.2000,1.6000,1.6000,1.5484,2.2222,1.7917,1.8182,1.5000,1.3929,1.5652,2.4118,3.2500,4.4444,2.0526,2.1905,2.2222,2.0556,2.4667,1.8333,2.2778,2.1053,1.2000,1.1515,1.2286,1.1667,0.9574,1.0000) > par2 = '12' > 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/1on5n1256059982.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/2wil41256059982.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/3q45z1256059982.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/43s061256059982.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/5q8631256059982.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/6bjsx1256059982.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/76elh1256059982.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. 0.9138 1.2620 1.4440 1.5960 1.6410 4.4440 > > #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/8l98u1256059982.tab") > > system("convert tmp/1on5n1256059982.ps tmp/1on5n1256059982.png") > system("convert tmp/2wil41256059982.ps tmp/2wil41256059982.png") > system("convert tmp/3q45z1256059982.ps tmp/3q45z1256059982.png") > system("convert tmp/43s061256059982.ps tmp/43s061256059982.png") > system("convert tmp/5q8631256059982.ps tmp/5q8631256059982.png") > system("convert tmp/6bjsx1256059982.ps tmp/6bjsx1256059982.png") > system("convert tmp/76elh1256059982.ps tmp/76elh1256059982.png") > > > proc.time() user system elapsed 1.492 1.049 3.103