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(655362,873127,1107897,1555964,1671159,1493308,2957796,2638691,1305669,1280496,921901,867888,652586,913831,1108544,1555827,1699283,1509458,3268975,2425016,1312703,1365498,934453,775019,651142,843192,1146766,1652601,1465906,1652734,2922334,2702805,1458956,1410363,1019279,936574,708917,885295,1099663,1576220,1487870,1488635,2882530,2677026,1404398,1344370,936865,872705,628151,953712,1160384,1400618,1661511,1495347,2918786,2775677,1407026,1370199,964526,850851,683118,847224,1073256,1514326,1503734,1507712,2865698,2788128,1391596,1366378,946295,859626) > 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/1wzl41229803882.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/26wi01229803882.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.002261066 -0.254440350 0.162634146 -0.076069981 [6] -0.160619107 -0.261847595 -0.169724933 -0.061440570 0.123507310 [11] -0.225620010 0.017117379 0.800539555 0.021614496 -0.210155555 [16] 0.141211835 -0.066442227 -0.125743504 -0.210173440 -0.148758595 [21] -0.037411262 0.079509650 -0.165341855 -0.009939553 0.620007352 [26] 0.067942418 -0.193331787 0.110768315 -0.028947311 -0.106842483 [31] -0.165618774 -0.104043999 -0.043785345 0.056217846 -0.103659270 [36] -0.043624826 0.480898247 0.061425754 -0.151049950 0.093513751 [41] -0.029716382 -0.075865996 -0.115604943 -0.072180232 -0.047720007 [46] 0.043010029 -0.065377506 -0.044568204 0.331333771 0.045165366 [51] -0.106602081 0.082288113 -0.036863112 -0.042070651 -0.060906127 [56] -0.056383334 -0.011470257 0.014152043 -0.048269080 -0.003067303 [61] 0.160391422 > (mypacf <- c(rpacf$acf)) [1] -0.002261066 -0.254446763 0.172506579 -0.161969354 -0.070347529 [6] -0.386674544 -0.227307037 -0.326419166 0.048320616 -0.605849029 [11] -0.182235551 0.493193321 0.055676982 0.005233921 -0.110759252 [16] -0.092720097 -0.004442410 0.047298990 0.084374897 0.023359134 [21] -0.028320794 0.069785148 -0.103035989 -0.029350144 0.041148968 [26] -0.028030687 -0.008963517 0.034829212 -0.032706733 0.004903045 [31] 0.042075744 -0.038238182 0.018612720 0.033190392 0.013299749 [36] 0.010152738 -0.113488035 0.084685996 -0.026527179 -0.006526486 [41] 0.015230938 0.015268944 -0.002040268 0.029404381 -0.025798877 [46] 0.017339496 0.042273233 -0.080682282 -0.025040613 -0.053592110 [51] 0.048460234 -0.036113675 0.022253497 0.001236192 -0.005898967 [56] 0.068709701 0.004379300 -0.026463661 0.124030325 -0.141106943 > 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/38u0f1229803882.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/4jfhf1229803882.tab") > > system("convert tmp/1wzl41229803882.ps tmp/1wzl41229803882.png") > system("convert tmp/26wi01229803882.ps tmp/26wi01229803882.png") > > > proc.time() user system elapsed 0.575 0.324 0.793