R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(1143.94,1227.85,1261.26,1408.95,1162.58,1259.39,1253.85,1475.32,1211.75,1303.83,1299.37,1430.73,1244.95,1318.58,1318.74,1525.05,1275.88,1360.09,1349.81,1574.04,1294.58,1380.60,1369.22,1565.98,1338.96,1457.57,1456.21,1654.44,1428.47,1530.39,1514.13,1698.25,1454.22,1578.06,1526.53,1714.21,1492.86,1593.42,1555.50,1820.55,1534.57,1636.03,1594.58,1805.13,1565.37,1679.57,1638.26,1854.64,1628.72,1744.97,1694.35,1920.88,1680.26,1778.62,1740.89,2010.56) > par8 = '' > par7 = '95%' > par6 = 'White Noise' > par5 = '4' > 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/rcomp/tmp/1k9lj1293192191.ps",horizontal=F,onefile=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/rcomp/tmp/2k9lj1293192191.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.00000000 0.57622230 0.68942388 0.49657900 0.81753591 0.43294785 [7] 0.53576002 0.34544043 0.64601310 0.29443634 0.38915613 0.21600176 [13] 0.49238260 0.16265131 0.24430308 0.07965620 0.34183641 0.03296129 [19] 0.10437030 -0.04525171 0.19030947 -0.07805169 -0.01831879 -0.15856660 [25] 0.04886537 -0.19745956 -0.14763160 -0.26656936 -0.07652903 -0.28776615 [31] -0.23712845 -0.33472975 -0.15227574 -0.33185899 -0.27931627 -0.35518150 [37] -0.18921654 -0.34289131 -0.30241659 -0.36329626 -0.21654598 -0.33211710 [43] -0.29523020 -0.33552030 -0.21663228 -0.29490965 -0.26008792 -0.28593513 [49] -0.17635630 -0.23694031 -0.20231895 -0.20394618 -0.10844334 -0.12706967 [55] -0.09960833 -0.08073520 > (mypacf <- c(rpacf$acf)) [1] 0.576222301 0.535043318 0.007479337 0.660093565 -0.498738645 [6] -0.088400620 0.059526365 0.140357480 -0.143319648 -0.077621426 [11] 0.076747193 -0.002115346 -0.118405941 -0.062210777 0.009897492 [16] 0.025092511 -0.086653352 -0.057643058 0.025057679 -0.081022289 [21] 0.043276752 -0.057133002 -0.059219673 -0.072801841 -0.051200619 [26] -0.020294225 -0.004998432 -0.032235098 0.001198218 -0.002024659 [31] -0.017034580 -0.003778193 -0.003650982 0.010066167 0.002569465 [36] -0.030428691 -0.020958372 -0.053592979 -0.004425015 -0.033911272 [41] 0.067631746 -0.012527487 -0.020547627 -0.077805887 0.065555569 [46] 0.030674021 -0.045299990 0.039778943 -0.029458540 0.022960294 [51] 0.051823214 -0.004256586 0.122565998 -0.019199640 0.037168402 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3oskp1293192191.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/rcomp/tmp/4rs0v1293192191.tab") > > try(system("convert tmp/1k9lj1293192191.ps tmp/1k9lj1293192191.png",intern=TRUE)) character(0) > try(system("convert tmp/2k9lj1293192191.ps tmp/2k9lj1293192191.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.69 0.39 1.07