R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(0.007850049,0.008671912,0.008391986,0.008691954,0.008724839,0.008949762,0.009344295,0.009971514,0.010388067,0.008884599,0.01000981,0.012393539,0.007933519,0.008087396,0.008120881,0.008147148,0.00917087,0.009668358,0.009897495,0.011217878,0.010190084,0.009560637,0.011200671,0.013546776,0.008524882,0.009142143,0.008793047,0.009296235,0.009974995,0.009692013,0.010120046,0.011004981,0.010328492,0.009428406,0.011114429,0.011798579,0.008997058,0.008803914,0.007974159,0.008460945,0.009917747,0.009604284,0.011028851,0.011162991,0.010420855,0.009897095,0.010715298,0.012461041,0.008754735,0.009381664,0.008843755,0.009235122,0.009973356,0.009146341,0.011038445,0.010830104,0.010585414,0.010560523,0.010897526,0.014012667) > par5 = '12' > par4 = '2' > par3 = '0' > par2 = '1' > par1 = '48' > #'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!) > if (par1 == 'Default') { + par1 = 10*log10(length(x)) + } else { + par1 <- as.numeric(par1) + } > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.numeric(par4) > par5 <- as.numeric(par5) > if (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } > if (par3 > 0) x <- diff(x,lag=1,difference=par3) > if (par4 > 0) x <- diff(x,lag=par5,difference=par4) > postscript(file="/var/www/html/rcomp/tmp/1mg3s1197316331.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x,par1,main='Autocorrelation',xlab='lags',ylab='ACF') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2jvnx1197316331.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF') > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.0000000000 0.4183294104 0.4044484987 0.1458153586 0.2108974031 [6] 0.0805976791 0.0198422370 -0.1019976563 -0.1468036901 -0.0876645412 [11] -0.3010474485 -0.2566054542 -0.4624136717 -0.2784573238 -0.2243909908 [16] -0.0651632285 -0.1665851583 0.0187058958 -0.0236004382 0.0001329913 [21] 0.0207906407 -0.0396946208 0.0625771678 0.0777480069 0.0739218885 [26] 0.0894635084 0.0500937589 -0.0358134914 -0.0834082230 -0.0564253861 [31] -0.0261558578 0.0325505852 0.0558906735 0.0436928195 0.0401852494 [36] 0.0105434077 > (mypacf <- c(rpacf$acf)) [1] 0.418329410 0.278119834 -0.121740522 0.114014394 -0.022709893 [6] -0.113598286 -0.106780806 -0.090937508 0.069063735 -0.294387790 [11] -0.079234030 -0.244593354 -0.011830001 0.127058266 0.063737431 [16] -0.104493634 0.124686105 -0.067519031 -0.153543832 -0.013957064 [21] -0.099109197 -0.041752412 0.003753988 -0.148433037 0.120888484 [26] -0.088275475 -0.066445032 -0.150568317 0.021127600 0.084442863 [31] -0.042458344 0.030876130 0.015891256 -0.105149433 -0.017764412 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > load(file='/var/www/html/rcomp/createtable') > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','ACF(k)','click here for more information about the Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:par1) { + a<-table.row.start(a) + a<-table.element(a,i-1,header=TRUE) + a<-table.element(a,round(myacf[i],6)) + mytstat <- myacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3yjtw1197316332.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Partial Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','PACF(k)','click here for more information about the Partial Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:par1) { + a<-table.row.start(a) + a<-table.element(a,i-1,header=TRUE) + a<-table.element(a,round(mypacf[i],6)) + mytstat <- mypacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4hyly1197316332.tab") > > system("convert tmp/1mg3s1197316331.ps tmp/1mg3s1197316331.png") > system("convert tmp/2jvnx1197316331.ps tmp/2jvnx1197316331.png") > > > proc.time() user system elapsed 0.852 0.349 0.996