R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(4000 + ,3600 + ,1600 + ,2500 + ,3800 + ,3500 + ,4100 + ,2000 + ,3300 + ,4000 + ,4100 + ,4200 + ,1100 + ,1900 + ,4800 + ,4000 + ,3250 + ,1200 + ,3600 + ,3400 + ,3600 + ,3300 + ,1300 + ,2500 + ,3800 + ,3800 + ,3000 + ,1600 + ,2100 + ,3900 + ,4000 + ,3900 + ,2300 + ,3600 + ,3600 + ,4200 + ,4400 + ,1900 + ,2700 + ,3600 + ,4100 + ,5250 + ,1200 + ,3000 + ,4000 + ,5200 + ,2100 + ,3400 + ,5200 + ,6900 + ,2300 + ,4100 + ,4300 + ,4500 + ,4700 + ,2200 + ,2900 + ,4400 + ,5100 + ,2300 + ,3500 + ,4100 + ,4700 + ,5400 + ,2500 + ,3500 + ,3900 + ,4100 + ,4500 + ,1800 + ,4900 + ,4500 + ,3700 + ,3100 + ,1700 + ,4000 + ,4200 + ,4300 + ,3600 + ,2600 + ,4600 + ,4000 + ,2900 + ,1800 + ,3000 + ,4200 + ,4400 + ,4900 + ,2300 + ,2400 + ,3600 + ,3900 + ,2800 + ,3800 + ,4400 + ,4200 + ,5400 + ,2300 + ,3500 + ,3800 + ,4400 + ,4400 + ,2500 + ,3700 + ,3500 + ,3300 + ,3700 + ,2200 + ,3200 + ,3100 + ,4800 + ,4400 + ,2500 + ,3100 + ,4700 + ,4300 + ,4600 + ,3100 + ,3200 + ,4300 + ,4000 + ,4500 + ,2600 + ,3600 + ,4700 + ,3800 + ,4100 + ,1700 + ,3200 + ,4000 + ,3700 + ,3600 + ,2500 + ,3800 + ,4500 + ,3500 + ,4100 + ,2300 + ,3400 + ,4800 + ,4900 + ,2600 + ,3300 + ,3900 + ,3800 + ,5000 + ,1700 + ,2700 + ,4000 + ,3300 + ,4000 + ,2500 + ,3600 + ,3800 + ,5900 + ,3600 + ,3300 + ,4000 + ,4200 + ,4300 + ,2900 + ,3900 + ,5200 + ,4000 + ,4700 + ,2200 + ,2400 + ,3700 + ,3700 + ,3000 + ,2100 + ,3500 + ,6300 + ,5200 + ,7800 + ,2700 + ,3400 + ,5000 + ,5500 + ,4500 + ,2600 + ,3900 + ,3800 + ,4400 + ,4300 + ,3300 + ,3600 + ,5300 + ,3700 + ,3800 + ,4000 + ,5200 + ,5100 + ,5100 + ,5200 + ,3800 + ,6700 + ,5200 + ,4900 + ,5700 + ,2700 + ,6300 + ,5200 + ,4500 + ,6400 + ,4000 + ,3500 + ,4700 + ,4700 + ,5000 + ,2300 + ,5200 + ,5100 + ,5400 + ,4400 + ,2600 + ,4700 + ,6100 + ,6100 + ,3500 + ,4900 + ,5500 + ,5300 + ,6300 + ,2800 + ,5900 + ,5500 + ,5200 + ,6400 + ,3100 + ,5100 + ,5400 + ,5400 + ,5100 + ,2400 + ,5500 + ,5300 + ,5000 + ,4500 + ,2000 + ,3800 + ,4900 + ,5000 + ,4000 + ,1900 + ,5200 + ,5400 + ,3200 + ,800 + ,3800 + ,4300 + ,2700) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1h1fs1242309607.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/2k63j1242309607.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.358208839 -0.178676881 -0.122440354 -0.025636238 [6] 0.509774741 -0.250265907 -0.133744538 -0.113497661 0.085770063 [11] 0.381144007 -0.264704410 -0.098759714 -0.087936720 0.150704662 [16] 0.203818949 -0.188230177 -0.077825251 -0.052884187 0.169947897 [21] 0.118061681 -0.176933409 -0.044090069 -0.071259536 0.234507876 [26] 0.023100721 -0.157865186 -0.012987551 -0.078802639 0.205394071 [31] 0.030955770 -0.137707595 -0.075593431 0.063119755 0.123613984 [36] -0.003094976 -0.145866900 -0.020859396 0.055636328 0.107994479 [41] -0.007788499 -0.136956027 0.025057064 0.007039611 0.123969472 [46] -0.067312990 -0.065178049 -0.015957687 0.045507144 > (mypacf <- c(rpacf$acf)) [1] -0.358208839 -0.352179916 -0.438909992 -0.587211514 0.052549536 [6] -0.005882641 0.015587510 -0.134526971 -0.222152011 0.024971231 [11] -0.004955140 0.043588035 -0.039419180 -0.059929606 -0.120268596 [16] -0.063689480 -0.019884018 -0.013096561 0.009482139 0.033237265 [21] 0.019337515 0.065216939 -0.052568592 0.072631963 0.082548343 [26] 0.063736862 0.114671822 -0.022308769 -0.093808044 -0.013239875 [31] 0.035706525 -0.065051739 0.110052669 0.004166094 0.019708752 [36] -0.068747407 -0.036263693 -0.055602541 -0.037278493 -0.012682063 [41] -0.023750339 0.068396283 -0.086806668 0.007884628 -0.064711228 [46] 0.050945901 -0.021421611 0.007422644 > 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/3phhw1242309607.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/4jwku1242309607.tab") > > system("convert tmp/1h1fs1242309607.ps tmp/1h1fs1242309607.png") > system("convert tmp/2k63j1242309607.ps tmp/2k63j1242309607.png") > > > proc.time() user system elapsed 0.585 0.300 0.709