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(112.6,113.8,107.8,103.2,103.3,101.2,107.7,110.4,101.9,115.9,89.9,88.6,117.2,123.9,100,103.6,94.1,98.7,119.5,112.7,104.4,124.7,89.1,97,121.6,118.8,114,111.5,97.2,102.5,113.4,109.8,104.9,126.1,80,96.8,117.2,112.3,117.3,111.1,102.2,104.3,122.9,107.6,121.3,131.5,89,104.4,128.9,135.9,133.3,121.3,120.5,120.4,137.9,126.1,133.2,146.6,103.4,117.2) > par5 = '6' > par4 = '1' > 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/1fp8t1196779536.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/2cy2o1196779536.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.126653968 -0.239491504 0.085202666 0.379106286 [6] 0.243061498 -0.673286745 0.171904044 0.258466173 0.034891585 [11] -0.303911147 -0.151321673 0.530580947 -0.184332489 -0.174881827 [16] -0.072098198 0.216046164 0.067736494 -0.491403708 0.131349425 [21] 0.106936902 0.013524070 -0.253253305 -0.051468035 0.392383050 [26] -0.136046121 -0.109785648 0.012297116 0.236642413 0.049884399 [31] -0.314244310 0.129511985 0.131083173 -0.017304430 -0.216672699 [36] -0.039663545 0.239292442 -0.069119842 -0.179787602 -0.032112526 [41] 0.150542484 -0.026443964 -0.199813301 -0.011492476 0.049511943 [46] 0.010109706 -0.126612821 -0.022743127 0.086289866 -0.026560919 [51] -0.001611199 -0.001381736 0.022053802 0.005090231 > (mypacf <- c(rpacf$acf)) [1] -0.1266539684 -0.2596986168 0.0153672371 0.3626606885 0.4785078712 [6] -0.5919627395 -0.0093712529 -0.0931307979 0.1573090372 0.0482498054 [11] 0.1575618243 -0.0109899177 -0.1965357140 -0.0366339339 -0.0643426604 [16] -0.0486189467 -0.0245387748 -0.1281597119 -0.0466674600 0.0855560143 [21] 0.0768338925 0.0001520251 0.0335469893 0.0080525393 0.0024600536 [26] -0.0045070775 0.1129896435 -0.0480669725 0.0354587883 -0.0400527310 [31] -0.0506170125 -0.0138341939 -0.0435163664 -0.0802791851 -0.0819781246 [36] -0.0639903348 0.1619158281 -0.0538200506 -0.0273585102 -0.1619608761 [41] -0.1580597994 0.0857805881 0.1508332493 -0.1045670940 0.0139505571 [46] -0.0034530381 0.0412912840 -0.0035638469 -0.0125213434 -0.0132054083 [51] -0.0545394758 -0.0756736627 0.0048820564 > 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/30gu01196779536.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/4vq2i1196779536.tab") > > system("convert tmp/1fp8t1196779536.ps tmp/1fp8t1196779536.png") > system("convert tmp/2cy2o1196779536.ps tmp/2cy2o1196779536.png") > > > proc.time() user system elapsed 0.892 0.320 1.032