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(428800 + ,424800 + ,403400 + ,398400 + ,393500 + ,380500 + ,398300 + ,387300 + ,370400 + ,372800 + ,444600 + ,449900 + ,458100 + ,424800 + ,420600 + ,400100 + ,393000 + ,387100 + ,377500 + ,400400 + ,391400 + ,363600 + ,431000 + ,441700 + ,448500 + ,415600 + ,408000 + ,416600 + ,409300 + ,387600 + ,394500 + ,407600 + ,378500 + ,359600 + ,435700 + ,433800 + ,427700 + ,413300 + ,379500 + ,379300 + ,353700 + ,378200 + ,380600 + ,394000 + ,374000 + ,375000 + ,437600 + ,443900 + ,488800 + ,463900 + ,440000 + ,453800 + ,451600 + ,453400 + ,461400 + ,509100 + ,540600 + ,555100 + ,677400 + ,694600 + ,750100 + ,733900 + ,709300 + ,720500 + ,693200 + ,687200 + ,686800 + ,720900 + ,653100 + ,624700 + ,690000 + ,717800 + ,736500 + ,699900 + ,675600 + ,635600 + ,632500 + ,594900 + ,604000 + ,620800 + ,578400 + ,571200 + ,627400 + ,657700 + ,674100 + ,672800 + ,615300 + ,609100 + ,607600 + ,566900 + ,572700 + ,589200 + ,534800 + ,543100 + ,591100 + ,624800 + ,665300 + ,642600 + ,608700 + ,594500 + ,563800 + ,596100 + ,597600 + ,633100 + ,591000 + ,584200 + ,655800 + ,670700 + ,699700 + ,712900 + ,652000 + ,635100 + ,603100 + ,610100 + ,602000 + ,597600 + ,585400 + ,567100 + ,620600 + ,646200 + ,644800 + ,645200 + ,644800 + ,593000 + ,569100 + ,518800 + ,538700 + ,554600 + ,507900 + ,488400 + ,563300 + ,592400 + ,598100 + ,546300 + ,516100 + ,518500 + ,477400 + ,483400 + ,469400 + ,501300 + ,457400 + ,446700 + ,501900 + ,550400 + ,593700 + ,548900 + ,534200 + ,550500 + ,541800 + ,569300 + ,587400 + ,627700 + ,607000 + ,629500 + ,704600 + ,767700 + ,812200 + ,824600 + ,856300 + ,812200 + ,764100 + ,801700 + ,806000 + ,867200 + ,801600 + ,817500 + ,920900 + ,959700 + ,997700 + ,949100 + ,910900 + ,920400 + ,914200 + ,926300 + ,906400 + ,926100 + ,902500 + ,895300 + ,979900 + ,1009700 + ,1043800 + ,979800 + ,921600 + ,923500 + ,914500 + ,891700 + ,916000 + ,931700 + ,902400 + ,893700 + ,941500 + ,980100 + ,1006900 + ,949200 + ,883200 + ,849900 + ,839200 + ,803900 + ,797900 + ,830800 + ,753300 + ,764100 + ,807600 + ,853700 + ,886200 + ,815700 + ,743000 + ,753600 + ,724800 + ,709600 + ,721900) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1gn8e1243598476.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/2woph1243598476.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.151179647 -0.082844844 -0.099714014 -0.115657646 [6] 0.077143233 -0.101710927 -0.002528310 -0.082730819 -0.109459478 [11] -0.095626944 0.156138602 0.658566330 0.176530262 -0.098368547 [16] -0.134627747 -0.164671119 -0.023187639 -0.093907137 -0.055858560 [21] -0.157767619 -0.092458750 -0.150234719 0.128065288 0.564535410 [26] 0.130801780 -0.094591143 -0.203339183 -0.157674802 -0.032854638 [31] -0.132722009 -0.027693410 -0.171425100 -0.113542314 -0.133831884 [36] 0.113213686 0.555249823 0.115167700 -0.122334611 -0.175465361 [41] -0.153179762 -0.002785581 -0.114221283 -0.088010285 -0.123694448 [46] -0.071634534 -0.081473542 0.106734267 0.476059189 > (mypacf <- c(rpacf$acf)) [1] 0.1511796473 -0.1081724422 -0.0719483332 -0.1007733206 0.0997299847 [6] -0.1646802421 0.0447008750 -0.1250670418 -0.0726913790 -0.1394652867 [11] 0.2183566199 0.6027661011 0.0772125576 -0.0783835957 -0.0506470031 [16] -0.1381544654 -0.2012381277 -0.0506434993 -0.0153317968 -0.1826923587 [21] 0.0512089159 -0.1082675174 -0.0230116782 0.2065730744 0.0017136916 [26] -0.0831930276 -0.0869036281 0.0207279298 -0.0674138128 -0.0901147078 [31] 0.1199528335 -0.0722369598 -0.0863974584 -0.0081681214 0.0174087958 [36] 0.0936449974 -0.0204247190 -0.0805427009 -0.0291372382 -0.0100859033 [41] 0.0322929934 -0.0483512319 -0.1077472564 0.0001466747 0.0480775454 [46] 0.0308664874 -0.0393663901 0.0062663201 > 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/34nrf1243598476.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/4d4go1243598476.tab") > > system("convert tmp/1gn8e1243598476.ps tmp/1gn8e1243598476.png") > system("convert tmp/2woph1243598476.ps tmp/2woph1243598476.png") > > > proc.time() user system elapsed 0.565 0.295 0.694