R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(106,82,114,118,105,105,103,107,123,112,104,122,108,94,120,118,117,113,106,108,122,115,110,120,104,96,121,111,120,114,107,108,127,105,119,121,106,97,119,122,121,106,114,112,127,109,118,123,115,105,116,131,121,104,127,126,124,132,117,123) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '36' > #'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/1lt7t1227867460.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/2heh81227867460.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.00000000 -0.18967550 -0.02929403 0.32787877 -0.04363648 -0.03718515 [7] 0.25201728 -0.16924166 0.05369913 0.15840374 -0.10560249 -0.15383124 [13] 0.09901272 -0.07661303 -0.05872255 0.08257784 -0.21185368 0.01194149 [19] 0.10126732 -0.13050994 -0.01977723 -0.01456000 -0.14072685 0.19513401 [25] -0.31564458 -0.04780156 0.11661445 -0.09669878 -0.17464085 0.07222249 [31] -0.15898519 -0.07877270 0.06755902 -0.04631432 -0.07987627 0.09521945 [37] -0.02287830 > (mypacf <- c(rpacf$acf)) [1] -0.1896754952 -0.0677066953 0.3221161341 0.0891114095 -0.0220048477 [6] 0.1547297669 -0.1242677659 0.0214031194 0.0665498299 0.0003625942 [11] -0.2177609714 -0.0863675054 0.0013887977 0.0097740441 0.0738042484 [16] -0.1753620247 -0.0030549436 0.0431641364 0.0551508094 0.0193572070 [21] -0.1410851396 -0.1489469547 0.1774198724 -0.2846203473 -0.0523862819 [26] 0.0059292860 0.0188433628 -0.1401337575 -0.0696081598 -0.0229899807 [31] -0.1230519843 -0.0090011140 0.0924345222 0.0843267529 -0.1507220018 [36] -0.0114145990 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #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,'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 2:(par1+1)) { + 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(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3tlky1227867460.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,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(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4qqqs1227867460.tab") > > system("convert tmp/1lt7t1227867460.ps tmp/1lt7t1227867460.png") > system("convert tmp/2heh81227867460.ps tmp/2heh81227867460.png") > > > proc.time() user system elapsed 0.556 0.316 0.680