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(467,460,448,443,436,431,484,510,513,503,471,471,476,475,470,461,455,456,517,525,523,519,509,512,519,517,510,509,501,507,569,580,578,565,547,555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542,527,510,514) > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > 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/1venm1261341218.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/268411261341218.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.00000000 0.91870139 0.79933049 0.69833068 0.63853991 0.62048814 [7] 0.59377049 0.55591639 0.52152322 0.52482675 0.55871053 0.59621792 [13] 0.60168917 0.50629017 0.38700237 0.28631671 0.22244246 0.19059795 [19] 0.15458942 0.11780728 0.07971263 0.07203086 0.09009189 0.11466729 [25] 0.11179759 0.02770295 -0.07578034 -0.15889252 -0.20536375 -0.22474329 [31] -0.24775530 -0.26766330 -0.28638434 -0.27891562 -0.25186239 -0.22255312 [37] -0.21026092 -0.26155467 -0.32886447 -0.38063793 -0.40583388 -0.40874892 [43] -0.41197619 -0.41359503 -0.41323944 -0.38947455 -0.34773050 -0.30465440 [49] -0.27583572 -0.30099443 -0.33686024 -0.35603934 -0.35345415 -0.33465259 [55] -0.31559982 -0.29408202 -0.27068803 -0.23211401 -0.19050329 -0.15079585 [61] -0.12174921 > (mypacf <- c(rpacf$acf)) [1] 0.9187013931 -0.2864440087 0.1172725425 0.1541266555 0.1551845889 [6] -0.1411318665 0.0408343663 0.0817421112 0.2489968534 0.0738636713 [11] 0.0632978722 -0.0852503012 -0.5456229822 0.0368089042 -0.0789726326 [16] -0.0252022143 -0.0727861881 0.0571400181 0.0426822140 -0.1324734311 [21] 0.0324144159 0.0216697845 0.0865989423 -0.1030496310 -0.1496091321 [26] 0.0149074201 -0.0094298693 -0.0458490092 -0.0512589833 0.0415599130 [31] 0.0191322088 -0.0338517989 -0.0122044365 0.0090816256 0.0001040925 [36] 0.0556045305 -0.0658480954 0.0045431985 -0.0296750817 -0.0594863665 [41] -0.0214207188 -0.0027662698 -0.0431221329 0.0009615965 0.0295254022 [46] 0.0140231139 -0.0224562569 0.0142234001 -0.0199332077 0.0483244853 [51] 0.0129069272 -0.0087856356 0.0069843679 0.0509695885 -0.0062681272 [56] -0.0061659124 -0.0223223613 -0.0828455057 0.0149512438 -0.0230518329 > 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/3c7751261341218.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/4bl361261341218.tab") > try(system("convert tmp/1venm1261341218.ps tmp/1venm1261341218.png",intern=TRUE)) character(0) > try(system("convert tmp/268411261341218.ps tmp/268411261341218.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.577 0.300 0.693