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(921365,987921,1132614,1332224,1418133,1411549,1695920,1636173,1539653,1395314,1127575,1036076,989236,1008380,1207763,1368839,1469798,1498721,1761769,1653214,1599104,1421179,1163995,1037735,1015407,1039210,1258049,1469445,1552346,1549144,1785895,1662335,1629440,1467430,1202209,1076982,1039367,1063449,1335135,1491602,1591972,1641248,1898849,1798580,1762444,1622044,1368955,1262973,1195650,1269530,1479279,1607819,1712466,1721766,1949843,1821326,1757802,1590367,1260647,1149235,1016367,1027885,1262159,1520854,1544144,1564709,1821776,1741365,1623386,1498658,1241822,1136029) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1f69l1292332165.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2f69l1292332165.ps",horizontal=F,onefile=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.117341552 -0.034052675 0.161250069 0.212290646 [6] -0.152158673 0.050740987 0.089492375 0.059876127 -0.220188741 [11] -0.023456106 0.014280667 -0.274550343 -0.165832939 0.038671407 [16] -0.186019004 -0.014886093 -0.098536531 0.049213251 -0.161144429 [21] -0.029979826 0.125169726 0.047644057 -0.089589926 0.013669934 [26] 0.141688410 -0.053142798 0.023124115 -0.033387034 0.153779709 [31] -0.028215741 -0.016150939 0.057266728 -0.061958702 -0.130123023 [36] 0.095323968 -0.014649243 0.024099297 0.023715614 0.053565375 [41] -0.047610768 -0.030620108 -0.001599838 0.135573272 -0.178364723 [46] 0.107133622 0.048567518 -0.018566659 -0.077330126 0.119634650 [51] -0.068812762 -0.020341139 -0.018277286 0.068610484 -0.055679245 [56] 0.023349210 0.019270959 -0.031124402 -0.003310803 > (mypacf <- c(rpacf$acf)) [1] -0.1173415519 -0.0484893665 0.1538457574 0.2581367016 -0.0882341583 [6] 0.0005145265 0.0161901765 0.0718657861 -0.1771808235 -0.1366052529 [11] -0.0542649865 -0.2666280050 -0.1625136523 -0.0444933816 -0.1472061641 [16] 0.1276345117 -0.0497307756 0.0832614411 -0.0888397884 -0.0547170962 [21] 0.1203605897 -0.0056428368 -0.0222777695 -0.2405498579 -0.0324701485 [26] -0.0920898467 -0.0451758656 -0.1448207372 0.0104782379 0.0627099069 [31] 0.0078586129 0.0020667590 -0.1188600150 -0.1681333975 0.0485242345 [36] -0.0947553484 0.0467829152 0.0039699930 0.0229745762 0.0175698417 [41] -0.1067285001 -0.0125438042 -0.0286689674 -0.1205286129 -0.0150582375 [46] -0.1331770233 -0.0503120101 -0.0720115149 0.1363652601 -0.0035600975 [51] -0.0536602301 0.0152207359 -0.0655285790 0.0272954537 0.0481877559 [56] -0.0688253197 -0.1024444331 -0.0178726409 > 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/3ty6u1292332165.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/4376f1292332165.tab") > > try(system("convert tmp/1f69l1292332165.ps tmp/1f69l1292332165.png",intern=TRUE)) character(0) > try(system("convert tmp/2f69l1292332165.ps tmp/2f69l1292332165.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.613 0.331 1.816