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 = '0' > 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/1cq3u1243598225.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/2d9qc1243598225.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.977652127 0.949615247 0.923801383 0.901116866 [6] 0.882721636 0.859933754 0.840388112 0.820983650 0.804767045 [11] 0.793270425 0.787519738 0.774870243 0.738063285 0.693491494 [16] 0.651913562 0.614566919 0.582639213 0.550363748 0.520398966 [21] 0.493448242 0.472603717 0.455001714 0.444762641 0.429490971 [26] 0.393288180 0.351457508 0.312536081 0.281275851 0.255654483 [31] 0.229696309 0.207886672 0.187844963 0.173708538 0.164378409 [36] 0.162062266 0.154987449 0.127011542 0.093892153 0.064457737 [41] 0.041412119 0.023405757 0.005540012 -0.008782051 -0.018998552 [46] -0.024710184 -0.026340643 -0.022971356 -0.024463803 > (mypacf <- c(rpacf$acf)) [1] 0.977652127 -0.140021478 0.053203614 0.043492368 0.073697279 [6] -0.129466951 0.108144755 -0.037433660 0.077677334 0.064671971 [11] 0.147338166 -0.225963325 -0.509033602 -0.137961113 0.068013558 [16] -0.008662225 0.100008526 0.094442684 0.014824541 -0.003190661 [21] 0.120354144 -0.120926143 0.046634089 -0.017133058 -0.239118913 [26] -0.031882250 0.129679099 0.084031153 0.024411349 0.051088234 [31] 0.066093761 -0.153672456 0.015285506 0.014641580 -0.003308618 [36] -0.056469543 -0.125709676 -0.002878999 0.079387325 0.012420613 [41] -0.012978404 0.013524984 0.038740073 0.007930056 -0.009000432 [46] -0.034281281 -0.070113055 -0.016870725 > 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/36u3a1243598225.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/4ulz31243598225.tab") > > system("convert tmp/1cq3u1243598225.ps tmp/1cq3u1243598225.png") > system("convert tmp/2d9qc1243598225.ps tmp/2d9qc1243598225.png") > > > proc.time() user system elapsed 0.566 0.304 0.706