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(0.8832,0.8707,0.8766,0.8860,0.9170,0.9561,0.9935,0.9781,0.9806,0.9812,1.0013,1.0194,1.0622,1.0785,1.0797,1.0862,1.1556,1.1674,1.1365,1.1155,1.1267,1.1714,1.1710,1.2298,1.2638,1.2640,1.2261,1.1989,1.2000,1.2146,1.2266,1.2191,1.2224,1.2507,1.2997,1.3406,1.3123,1.3013,1.3185,1.2943,1.2697,1.2155,1.2041,1.2295,1.2234,1.2022,1.0000,1.1861,1.2126,1.1940,1.2028,1.2273,1.2767,1.2661,1.2681,1.2810,1.2722,1.2617,1.2888,1.3205,1.2993,1.3080,1.3246,1.3513,1.3518,1.3421,1.3726,1.3626,1.3910,1.4233,1.4683,1.4559,1.4728,1.4759,1.5520,1.5754,1.5554,1.5562,1.5759,1.4955,1.4342,1.3266,1.2744,1.3511,1.3244,1.2797,1.3050,1.3203) > 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/163lu1244127723.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/2zr9b1244127723.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.027565959 -0.100477842 0.002328018 0.121610058 [6] 0.100699635 -0.154222093 -0.085663947 -0.021764525 0.031051726 [11] -0.018250232 -0.054344181 -0.026621210 -0.055388793 0.068309684 [16] -0.003070504 -0.057692915 -0.022790010 0.022685998 0.105395191 [21] -0.039059462 -0.039829656 -0.049906453 -0.033255053 0.003012131 [26] -0.050730668 -0.008832465 0.103260118 -0.063488326 -0.157487401 [31] -0.088329747 0.121219788 -0.115663122 -0.090155703 -0.104889592 [36] 0.157458961 0.172042555 -0.127097942 0.002593422 0.174876143 [41] 0.047195098 0.010410110 0.012705029 0.044143176 -0.014050834 [46] 0.045778204 -0.033186339 -0.055524368 -0.017664994 > (mypacf <- c(rpacf$acf)) [1] -0.0275659593 -0.1013147117 -0.0035543632 0.1126351479 0.1102918541 [6] -0.1288728152 -0.0813088554 -0.0698261082 -0.0062733103 0.0005200176 [11] -0.0037415695 -0.0257665786 -0.0851541118 0.0410837722 -0.0034069261 [16] -0.0390621222 -0.0193058102 0.0001565824 0.0730972333 -0.0165031248 [21] -0.0143167356 -0.0748735324 -0.0888465473 -0.0295395964 -0.0213850055 [26] 0.0139886470 0.1319740363 -0.0778505269 -0.1939405973 -0.1514195437 [31] 0.0618257195 -0.1271490432 -0.0296141994 -0.1065576523 0.1014025109 [36] 0.1363681434 -0.0728056653 -0.0239724631 0.1271540094 -0.0394229634 [41] 0.0189280966 0.0869034394 0.0550056952 -0.0478783604 -0.0039158966 [46] -0.0764665109 -0.0267183387 0.0507935190 > 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/341vo1244127723.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/4i4ii1244127723.tab") > > system("convert tmp/163lu1244127723.ps tmp/163lu1244127723.png") > system("convert tmp/2zr9b1244127723.ps tmp/2zr9b1244127723.png") > > > proc.time() user system elapsed 0.570 0.312 1.484