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(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 = '1' > 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/html/rcomp/tmp/1bx341293195219.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/html/rcomp/tmp/2bx341293195219.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.269431287 0.178041334 0.087001667 -0.321451897 [6] -0.091348454 -0.115836523 -0.070139554 -0.096904445 0.022613466 [11] 0.114376923 0.103264774 0.142729918 -0.009315853 -0.076651464 [16] -0.172750064 -0.181935447 -0.165514750 -0.090362262 -0.040293306 [21] 0.060250794 0.094255833 0.041803542 0.089398557 0.156458806 [26] -0.005936415 0.044379861 0.011234186 -0.180072352 0.060697947 [31] 0.076472949 0.051422088 0.118860280 -0.052258922 -0.037850299 [36] -0.090223622 -0.039224884 -0.007445007 -0.050849834 -0.004713242 [41] 0.024163327 -0.036735568 -0.023901616 -0.043009360 -0.113883815 [46] -0.035211957 -0.025396829 0.004807115 0.018569103 -0.051472161 [51] -0.013890309 -0.025653544 > (mypacf <- c(rpacf$acf)) [1] 0.2694312874 0.1137021186 0.0151309521 -0.3996416299 0.0799853205 [6] 0.0007531089 0.0371919193 -0.2640480617 0.1538817774 0.1289994914 [11] 0.0877764680 -0.1343788908 -0.0504318884 -0.0095101375 -0.0851433741 [16] -0.1199617747 -0.1023244559 0.0723471055 -0.0597037889 0.0546170412 [21] -0.0694060648 -0.0007854883 -0.0122905516 0.2721020237 -0.1652372621 [26] 0.0511672685 -0.0165770659 0.0353401192 0.0752487258 0.0747097659 [31] -0.0304267361 -0.0502650809 -0.0846357216 0.0110071806 -0.0523311263 [36] -0.0453385797 0.0480433815 0.0111835782 0.0132891766 0.0383283991 [41] -0.1022297084 -0.0419451314 -0.0270453489 -0.0367040678 0.0352658118 [46] 0.0149313274 0.0056715175 -0.0557949807 -0.1048501291 -0.1124279470 [51] 0.0430594583 > 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/3xxks1293195219.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/4ig0y1293195219.tab") > > try(system("convert tmp/1bx341293195219.ps tmp/1bx341293195219.png",intern=TRUE)) character(0) > try(system("convert tmp/2bx341293195219.ps tmp/2bx341293195219.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.622 0.340 1.389