R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(112.61,113.4,115.18,121.01,119.44,116.68,117.07,117.41,119.58,120.92,117.09,116.77,119.39,122.49,124.08,118.29,112.94,113.79,114.43,118.7,120.36,118.27,118.34,117.82,117.65,118.18,121.02,124.78,131.16,130.14,131.75,134.73,135.35,140.32,136.35,131.6,128.9,133.89,138.25,146.23,144.76,149.3,156.8,159.08,165.12,163.14,153.43,151.01,154.72,154.58,155.63,161.67,163.51,162.91,164.80,164.98,154.54,148.60,149.19,150.61) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '0.0' > 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/1z3wt1197723402.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/2khxh1197723402.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.2973123116 -0.1458001858 -0.1763830234 -0.1856701766 [6] 0.0079503470 0.0906422293 -0.1663714860 -0.2132133192 0.0033574873 [11] 0.2295681311 0.3796251677 -0.0249353818 -0.0910617889 -0.0103001452 [16] -0.1329045110 -0.0547609266 -0.1251978623 -0.1674464542 -0.0048976070 [21] 0.0924336803 0.0140133369 -0.0102968113 -0.1031078444 0.0539537868 [26] 0.1522647109 -0.1053276984 -0.1547346150 -0.1463049375 -0.0817667139 [31] 0.1442349057 0.1018464846 -0.0655847152 -0.1058607217 -0.0419369792 [36] 0.0578222018 0.0783768031 -0.0974490887 -0.0548571486 0.0374705642 [41] 0.1098031102 0.1954437547 0.0767605740 -0.1056396727 -0.1043855597 [46] 0.0081623228 0.0472990653 0.0120764786 0.0091537890 -0.0001903324 [51] -0.0009236661 0.0561192874 0.0556681752 -0.0545102151 -0.0659490026 [56] -0.0172383821 0.0023481104 0.0010816079 0.0002185492 > (mypacf <- c(rpacf$acf)) [1] 0.2973123116 -0.2569036988 -0.0534598992 -0.1658752001 0.0904063023 [6] -0.0169064690 -0.2542464154 -0.0970020252 0.0631875150 0.1748460966 [11] 0.2238088871 -0.2710197268 0.2292468313 0.0257824805 -0.1761030532 [16] -0.0491696877 -0.1987549456 0.1739932713 -0.0710962011 -0.1380180197 [21] -0.0718331813 -0.1210004552 0.0346755916 -0.0228307714 -0.0103154538 [26] -0.0762614961 -0.0849562283 0.0378831915 -0.1300549607 0.0701353626 [31] -0.0678319673 -0.0044045042 -0.0758531251 -0.0988443627 -0.0456843886 [36] -0.0967133374 -0.0410966754 0.0066750283 0.0200463276 0.1212133391 [41] -0.0208055596 0.1198929970 -0.1524970891 -0.0482808281 0.0923266766 [46] -0.0484269203 0.0666968603 0.0008365856 -0.0930421820 -0.0412501162 [51] -0.0992933200 -0.0531611505 -0.0870700851 -0.0233402870 -0.0076255869 [56] -0.0259566133 0.0152889617 -0.0445116848 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/30rm51197723403.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4xrjx1197723403.tab") > > system("convert tmp/1z3wt1197723402.ps tmp/1z3wt1197723402.png") > system("convert tmp/2khxh1197723402.ps tmp/2khxh1197723402.png") > > > proc.time() user system elapsed 0.864 0.311 0.993