R version 2.7.0 (2008-04-22) 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(31.58,27.88,27.32,28.89,28.05,28.73,32.00,34.53,33.47,34.09,35.47,34.59,34.32,32.78,28.38,29.18,28.62,28.20,29.33,29.72,26.29,26.82,27.64,27.10,27.05,26.02,25.76,25.94,24.97,21.74,18.16,16.95,16.46,16.44,18.20,16.44,15.70,13.94,12.23,14.75,14.62,15.04,15.50,16.10,15.44,15.14,15.42,15.69,17.57,18.42,17.96,18.39,17.63,17.95,17.79,17.73,18.99,19.83,20.23,20.24,21.12,21.25,21.80,21.84,22.21,22.64,23.54,23.78,23.65,23.93,24.77,26.26,27.69,29.54,29.31,29.26,28.69,26.16,27.12,29.40,30.99,32.96,32.20,31.67,32.49,33.66,32.44,34.38,32.36,30.73,30.31,27.26,25.05,22.33,18.26,18.30,16.00,14.36,14.98,16.88,16.56,13.31,9.61,9.34,7.89,1.71,0.81,0.79) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/1qd031229770286.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/2woze1229770286.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.000000000 0.933218210 0.856816772 0.779557202 0.710568892 [6] 0.645657752 0.578398637 0.514864059 0.457598728 0.396858497 [11] 0.321249602 0.240403300 0.162739360 0.085475131 0.007100004 [16] -0.054069488 -0.111992354 -0.166679575 -0.212431584 -0.255867224 [21] -0.294175114 -0.315013789 -0.338513589 -0.354485495 -0.368847328 [26] -0.384706468 -0.393950612 -0.394428697 -0.400333961 -0.409988641 [31] -0.420770343 -0.428158813 -0.421734686 -0.408999020 -0.393387704 [36] -0.375068190 -0.354092697 -0.335508495 -0.317378267 -0.296741744 [41] -0.281646097 -0.262989414 -0.243123985 -0.224687932 -0.202175969 [46] -0.176115971 -0.146531259 -0.116726107 -0.086105713 -0.058835152 [51] -0.027781206 0.005056360 0.034459264 0.063737103 0.092974748 [56] 0.124141946 0.157113610 0.190630904 0.221925387 0.254947582 [61] 0.285166611 > (mypacf <- c(rpacf$acf)) [1] 0.933218210 -0.109055341 -0.042861001 0.022055362 -0.017223467 [6] -0.062845663 -0.007278627 0.006472780 -0.076745675 -0.156188257 [11] -0.075323650 -0.033839026 -0.082658944 -0.087505038 0.073669091 [16] -0.063023860 -0.064940822 0.023396169 -0.027145714 -0.031409464 [21] 0.087812177 -0.067164101 0.008717870 -0.048864437 -0.067276424 [26] 0.005169619 0.009803871 -0.116607991 -0.067896807 -0.079323770 [31] -0.053960441 0.053265704 -0.011887780 -0.022209926 0.016928716 [36] -0.041126507 -0.031918723 0.009068072 -0.011145905 -0.068570601 [41] 0.013963329 -0.064637764 -0.048111949 -0.009953022 -0.020652318 [46] 0.029876081 -0.013901631 -0.029420081 -0.005964288 0.019284398 [51] 0.004817641 0.019639612 0.015571603 -0.016507530 0.032029787 [56] 0.017404799 0.020814625 0.036575749 0.029678447 -0.013010848 > 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/3rspx1229770286.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/4k86h1229770286.tab") > > system("convert tmp/1qd031229770286.ps tmp/1qd031229770286.png") > system("convert tmp/2woze1229770286.ps tmp/2woze1229770286.png") > > > proc.time() user system elapsed 1.543 0.551 1.642