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(11514,31514,27071,29462,26105,22397,23843,21705,18089,20764,25316,17704,15548,28029,29383,36438,32034,22679,24319,18004,17537,20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698,31956,29506,34506,27165,26736,23691,18157,17328,18205,20995,17382,9367,31124,26551,30651,25859,25100,25778,20418,18688,20424,24776,19814,12738) > par5 = '12' > 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/1woi61229870365.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/2wcko1229870365.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.0000000000 0.3824393660 0.2084568440 -0.0594886972 -0.1337347438 [6] -0.0865964212 -0.0012910439 0.0008865553 0.1058584113 0.0639054609 [11] -0.2568102788 -0.3567370422 -0.4847834713 -0.2733480905 0.0166815177 [16] 0.0614859614 0.1023757625 0.0864232710 0.0326755670 -0.0606178169 [21] -0.0210317512 0.0590486336 0.0770063150 0.2899553653 0.1289421027 [26] 0.1563808457 0.0334156120 -0.0253009935 -0.0886895134 0.0150029777 [31] -0.1076592824 -0.0622802336 -0.1140459088 -0.1369064349 -0.0734536730 [36] -0.1280617552 -0.1528077928 -0.0689413912 -0.0481835987 -0.0110625610 [41] 0.0394307886 0.0002607158 0.0901421518 0.1077180940 0.0906253039 [46] 0.0504977468 0.0296231093 -0.0062431197 0.0288371355 > (mypacf <- c(rpacf$acf)) [1] 0.3824393660 0.0728523505 -0.1898996322 -0.0835785277 0.0427105495 [6] 0.0556412175 -0.0467289551 0.1004510433 0.0059362016 -0.3913608937 [11] -0.2142220549 -0.2234056753 -0.0065876278 0.1664594129 -0.0763758011 [16] -0.0445981937 -0.0008516914 0.0526358663 -0.0409810383 0.0390054805 [21] 0.1249923025 -0.2909358728 0.0850726320 -0.0704605292 0.1047231146 [26] 0.1121610286 -0.0382328585 -0.0602912325 0.0571846904 -0.1235389852 [31] -0.0823820721 -0.1147084977 0.0898852811 -0.1083344117 -0.0602828368 [36] -0.0366616604 -0.0022701215 0.0372238979 -0.0315386043 -0.0059932336 [41] -0.0678337610 -0.0174417367 -0.0861739942 -0.0619217832 0.0836186108 [46] -0.1390074392 -0.0889720265 -0.0430055505 > 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/3jihn1229870365.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/44lyb1229870365.tab") > > system("convert tmp/1woi61229870365.ps tmp/1woi61229870365.png") > system("convert tmp/2wcko1229870365.ps tmp/2wcko1229870365.png") > > > proc.time() user system elapsed 0.607 0.323 0.714