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(15916.4,16535.9,15796,14418.6,15044.5,14944.2,16754.8,14254,15454.9,15644.8,14568.3,12520.2,14803,15873.2,14755.3,12875.1,14291.1,14205.3,15859.4,15258.9,15498.6,15106.5,15023.6,12083,15761.3,16943,15070.3,13659.6,14768.9,14725.1,15998.1,15370.6,14956.9,15469.7,15101.8,11703.7,16283.6,16726.5,14968.9,14861,14583.3,15305.8,17903.9,16379.4,15420.3,17870.5,15912.8,13866.5,17823.2,17872,17420.4,16704.4,15991.2,16583.6,19123.5,17838.7,17209.4,18586.5,16258.1,15141.6,19202.1,17746.5,19090.1,18040.3,17515.5,17751.8,21072.4,17170,19439.5,19795.4,17574.9,16165.4,19464.6,19932.1,19961.2,17343.4,18924.2,18574.1,21350.6,18594.6,19823.1,20844.4,19640.2,17735.4,19813.6,22238.5,20682.2,17818.6,21872.1,22117,21865.9,23451.3,20953.7,22497.3) > 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/1f8931229963723.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/2l2521229963723.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.3572129774 -0.2894993175 0.0825587155 0.1393488567 [6] -0.1732151598 0.2456662984 -0.2257408216 0.1948428043 0.0204413559 [11] -0.2806197624 -0.1608359896 0.6679709255 -0.2292124808 -0.2004275864 [16] 0.0088985649 0.0878692774 -0.0587809905 0.1379371841 -0.1719321891 [21] 0.1887055834 -0.0076518496 -0.2892962897 0.0247037645 0.3842150577 [26] -0.1285343837 -0.1094455906 -0.0652885330 0.0931534314 -0.0092072584 [31] 0.0429300455 -0.0967678657 0.1618364815 -0.0375592909 -0.2112415941 [36] -0.0004709247 0.3144882299 -0.0778687008 -0.1127281989 -0.0892796256 [41] 0.1452887075 -0.0394386505 0.0215956973 -0.0813211150 0.1718746408 [46] -0.0871013944 -0.0937428071 -0.0587596268 0.2496949305 -0.0255297518 [51] -0.1049723281 -0.0941355237 0.1623975457 -0.0774591081 0.0536938305 [56] -0.0854790068 0.1136581810 -0.0272085247 -0.0810981775 -0.0743081665 [61] 0.2297552100 > (mypacf <- c(rpacf$acf)) [1] -0.3572129774 -0.4781074737 -0.3582318319 -0.2114748262 -0.3935504275 [6] 0.0324060367 -0.2808686345 0.2411855960 0.3640328174 0.0517037450 [11] -0.4529328475 0.0591854719 0.1301449725 0.2164561964 0.1442963965 [16] 0.0186174335 0.0213565294 -0.1068815465 -0.0844966169 -0.0714501044 [21] 0.0147225262 -0.0881454251 0.1278161118 -0.0047292576 0.0305047722 [26] 0.0540238718 -0.0365410820 0.1605948710 0.0174793497 0.0850183514 [31] -0.0474161095 -0.0789577286 -0.0573077613 0.0027669445 -0.1355130974 [36] 0.0069913643 0.0446306873 0.0135259785 -0.0695968759 -0.0204949476 [41] -0.0386153204 0.0263924806 -0.0299667504 0.0325166436 -0.0260261719 [46] 0.0658466356 0.1116985882 0.0243476820 0.0186483668 -0.0287918749 [51] 0.0072501444 -0.0008025791 -0.0745826922 0.0146800331 -0.0016363242 [56] -0.0862410973 0.0024625341 -0.0764023280 -0.0330888567 0.0508289404 > 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/39v201229963724.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/4f7h01229963724.tab") > > system("convert tmp/1f8931229963723.ps tmp/1f8931229963723.png") > system("convert tmp/2l2521229963723.ps tmp/2l2521229963723.png") > > > proc.time() user system elapsed 0.550 0.349 0.815