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(12710.3,12120.8,12469.5,12054.6,12112.9,9617.2,12645.8,13581.3,12162.3,10969.7,11880.0,11887.6,12926.9,12300.0,12092.8,12380.8,12196.9,9455.0,13168.0,13427.9,11980.5,11884.8,11691.7,12233.8,14341.4,13130.7,12421.1,14285.8,12864.6,11160.2,14316.2,14388.7,14013.9,13419.0,12769.6,13315.5,15332.9,14243.0,13824.4,14962.9,13202.9,12199.0,15508.9,14199.8,15169.6,14058.0,13786.2,14147.9,16541.7,13587.5,15582.4,15802.8,14130.5,12923.2,15612.2,16033.7,16036.6,14037.8,15330.6,15038.3,17401.8) > par5 = '12' > par4 = '0' > par3 = '0' > 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/11cai1196428128.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/2xfx71196428128.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.000000000 0.494220125 0.367365525 0.464684976 0.523909807 [6] 0.455598542 0.540747961 0.304816702 0.418691360 0.363473699 [11] 0.173529563 0.278607007 0.564627318 0.181208559 0.121447931 [16] 0.142036820 0.147140085 0.153146213 0.175832020 -0.018526577 [21] 0.087887748 0.022374922 -0.159866783 0.002369415 0.129299326 [26] -0.129894944 -0.157975092 -0.171350335 -0.136238770 -0.121609246 [31] -0.149065648 -0.267546836 -0.142183914 -0.231123711 -0.321490952 [36] -0.214637699 -0.127567195 > (mypacf <- c(rpacf$acf)) [1] 0.494220125 0.162901181 0.315611616 0.283355802 0.137229011 [6] 0.303938062 -0.236794996 0.193355618 -0.197438271 -0.343617003 [11] 0.141109250 0.383651196 -0.293978628 -0.060724183 -0.097061240 [16] -0.158997752 -0.092104217 0.020894755 0.145186435 -0.090365714 [21] -0.019255478 -0.071925856 0.050421763 -0.107546249 0.003520617 [26] -0.006185119 -0.099697803 0.102403861 -0.182220606 0.025527732 [31] -0.015241169 -0.009898477 0.003320614 0.080478423 -0.105255478 [36] 0.009181832 > 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/3m88m1196428128.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/4t4xr1196428129.tab") > > system("convert tmp/11cai1196428128.ps tmp/11cai1196428128.png") > system("convert tmp/2xfx71196428128.ps tmp/2xfx71196428128.png") > > > proc.time() user system elapsed 0.810 0.332 0.941