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(1202454.6,1201423.4,1505916,1513377.6,1977605.3,1873829.6,1424049.1,1322740,1584825.5,1680460.3,1648573.7,3095468.7,1307982.9,1367588.9,1572718.3,1611602.9,1641196.4,1845262.4,1464237.6,1402385.7,2077099.8,1691129.6,1729012.7,3347792.1,1365087.7,1545460,1844355.1,1775549.8,1721779.2,2128726.1,1664319.9,1769471.4,1904578.4,1872042.3,1802181,3222199.4,1491414.2,1658519.2,2079206.9,1748767.4,2084447.4,2067181.6,1718122.8,1782337.1,1958118.4,2028681.3,2076128.1,3383873,1870369,1654852.9,2074338.3,1888653.7,1991137.8,2168237.9,1867424.1,1842359.6,1927476.3,2065555.4,2455608.5,3336170.9) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/17dwt1228658850.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/2ug7f1228658850.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.5689413981 0.0940407894 0.0758023338 -0.1678875254 [6] 0.0700302781 -0.0569172437 0.0948441426 -0.0347182534 -0.0124557415 [11] -0.0407306972 0.2060602053 -0.2031157067 0.0438888329 0.0169887322 [16] -0.0602739357 -0.0062567296 0.0132786555 0.1563982602 -0.2272416393 [21] 0.2255247750 -0.1281777881 0.0253616036 -0.0004394363 -0.1200999488 [26] 0.2016331130 -0.1728548842 0.0635629886 0.1117115501 -0.0449261103 [31] -0.1159412741 0.1150369351 -0.1240594625 0.0851624898 -0.0216431941 [36] 0.0335852158 0.0087917568 > (mypacf <- c(rpacf$acf)) [1] -0.568941398 -0.339570597 -0.076416123 -0.192012896 -0.203570730 [6] -0.260712028 -0.103742647 -0.061108661 -0.088846385 -0.231133574 [11] 0.146791287 0.101031347 -0.006578345 -0.082126056 -0.035472821 [16] -0.126808719 -0.194138546 0.026730990 -0.152932595 0.048474611 [21] 0.032066660 0.042168102 0.061548764 -0.101531627 0.045123000 [26] -0.009872353 -0.077755710 0.040496830 0.152308487 0.021112942 [31] -0.049487188 -0.129323670 0.026791795 0.037690215 0.099574957 [36] -0.015225457 > 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/3ysja1228658850.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/45o1k1228658850.tab") > > system("convert tmp/17dwt1228658850.ps tmp/17dwt1228658850.png") > system("convert tmp/2ug7f1228658850.ps tmp/2ug7f1228658850.png") > > > proc.time() user system elapsed 0.556 0.326 0.668