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(102.86,102.12,100.74,100.96,101.01,100.41,100.35,99.33,98.66,98.69,98.61,96.41,96.3,96.12,97.32,101.78,102.28,101.12,104.55,107.4,108.41,109.43,110.34,115.06,113.13,116.56,121.39,119.12,123.31,128.57,127.71,125.68,133.8,130.97,129.99,124,118.63,121.86,119.97,125.03,130.09,126.65,121.7,119.24,122.63,116.66,114.12,113.11,112.61,113.4,115.18,121.01,119.44,116.68,117.07,117.41,119.58,120.92,117.09,116.77,119.39,122.49,124.08,118.29,112.94,113.79,114.43,118.7,120.36,118.27,118.34,117.82,117.65,118.18,121.02,124.78,131.16,130.14,131.75,134.73,135.35,140.32,136.35,131.6,128.9,133.89,138.25,146.23,144.76,149.3,156.8,159.08,165.12,163.14,153.43,151.01) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1vndm1196516471.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/2rlil1196516471.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.184543603 -0.079608000 -0.038657178 -0.149291847 [6] 0.065440613 0.055807838 -0.065984956 -0.143714871 -0.090604382 [11] 0.056746680 0.331064107 0.052371515 -0.128965904 0.054492523 [16] -0.129291958 -0.068517481 -0.012576602 -0.060914213 0.021119275 [21] -0.079531315 -0.078342042 0.006767062 -0.073769253 -0.024095299 [26] 0.123476680 -0.128258748 -0.151766745 0.049761650 0.008859771 [31] 0.113394752 0.030203199 -0.109513556 -0.099437231 -0.067876392 [36] 0.046504790 0.159895308 0.008219876 -0.057584697 0.002996602 [41] -0.093298107 0.079437581 0.049691483 -0.155219418 -0.144458124 [46] -0.144006244 0.017201741 0.114313407 0.063797879 0.027761251 [51] -0.005650896 -0.032777548 0.083507629 0.144769339 -0.167659531 [56] -0.045957958 -0.047147325 -0.014209712 0.143100076 0.064288999 [61] 0.090498368 > (mypacf <- c(rpacf$acf)) [1] 0.1845436034 -0.1176718131 -0.0005476939 -0.1580763227 0.1320798224 [6] -0.0188424874 -0.0599626320 -0.1492657332 -0.0146187838 0.0564547679 [11] 0.3085173128 -0.1226468056 -0.0642821052 0.1220382434 -0.1133516323 [16] -0.1022580114 -0.0723611453 0.0432394964 0.0894664369 -0.1250228752 [21] -0.1194056221 -0.0567010696 -0.0547954686 0.0020434270 0.0245921328 [26] -0.1402017402 -0.0233223121 0.0671115410 -0.0191643717 0.0097652551 [31] -0.0032642598 -0.0202524344 -0.1006542024 -0.0214468752 0.0016594155 [36] 0.0813549390 0.0416458717 0.0104528800 -0.1025174716 -0.1207103634 [41] 0.0648536441 -0.0625025418 -0.1606619474 -0.1244733002 -0.0421764083 [46] 0.0271994912 -0.0854801902 -0.0414451518 0.0054302257 0.0015255807 [51] 0.0312656468 0.0037121640 0.0521757149 -0.1375531479 0.0949324375 [56] -0.0556289149 0.0329526200 0.0328936427 0.0558366191 -0.0009008800 > 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/3yqnc1196516471.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/41xam1196516471.tab") > > system("convert tmp/1vndm1196516471.ps tmp/1vndm1196516471.png") > system("convert tmp/2rlil1196516471.ps tmp/2rlil1196516471.png") > > > proc.time() user system elapsed 0.897 0.326 1.044