R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(9005.73 + ,9018.68 + ,9349.44 + ,9327.78 + ,9753.63 + ,10443.5 + ,10853.87 + ,10704.02 + ,11052.23 + ,10935.47 + ,10714.03 + ,10394.48 + ,10817.9 + ,11251.2 + ,11281.26 + ,10539.68 + ,10483.39 + ,10947.43 + ,10580.27 + ,10582.92 + ,10654.41 + ,11014.51 + ,10967.87 + ,10433.56 + ,10665.78 + ,10666.71 + ,10682.74 + ,10777.22 + ,10052.6 + ,10213.97 + ,10546.82 + ,10767.2 + ,10444.5 + ,10314.68 + ,9042.56 + ,9220.75 + ,9721.84 + ,9978.53 + ,9923.81 + ,9892.56 + ,10500.98 + ,10179.35 + ,10080.48 + ,9492.44 + ,8616.49 + ,8685.4 + ,8160.67 + ,8048.1 + ,8641.21 + ,8526.63 + ,8474.21 + ,7916.13 + ,7977.64 + ,8334.59 + ,8623.36 + ,9098.03 + ,9154.34 + ,9284.73 + ,9492.49 + ,9682.35 + ,9762.12 + ,10124.63 + ,10540.05 + ,10601.61 + ,10323.73 + ,10418.4 + ,10092.96 + ,10364.91 + ,10152.09 + ,10032.8 + ,10204.59 + ,10001.6 + ,10411.75 + ,10673.38 + ,10539.51 + ,10723.78 + ,10682.06 + ,10283.19 + ,10377.18 + ,10486.64 + ,10545.38 + ,10554.27 + ,10532.54 + ,10324.31 + ,10695.25 + ,10827.81 + ,10872.48 + ,10971.19 + ,11145.65 + ,11234.68 + ,11333.88 + ,10997.97 + ,11036.89 + ,11257.35 + ,11533.59 + ,11963.12 + ,12185.15 + ,12377.62 + ,12512.89 + ,12631.48 + ,12268.53 + ,12754.8 + ,13407.75 + ,13480.21 + ,13673.28 + ,13239.71 + ,13557.69 + ,13901.28 + ,13200.58 + ,13406.97 + ,12538.12 + ,12419.57 + ,12193.88 + ,12656.63 + ,12812.48 + ,12056.67 + ,11322.38 + ,11530.75 + ,11114.08 + ,9181.73 + ,8614.55) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = 'Default' > #'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/1kgh11229283585.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/25aqc1229283585.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.00000000 0.15128752 -0.03867628 0.04380337 0.06348710 0.12880628 [7] -0.06145483 0.02223090 0.09638350 0.06221018 0.02687100 0.02882131 [13] 0.01231746 -0.07203091 -0.07086103 -0.04618497 -0.03891775 -0.03720916 [19] -0.03634712 0.08005658 -0.08232325 > (mypacf <- c(rpacf$acf)) [1] 0.151287518 -0.063006271 0.061193285 0.045584824 0.120666858 [6] -0.101459186 0.060963285 0.061897124 0.040394464 0.006332442 [11] 0.042829517 -0.025075932 -0.091578827 -0.053412682 -0.042080586 [16] -0.043820967 -0.023616567 -0.010096336 0.093251770 -0.113797513 > 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/32isw1229283585.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/4zbwe1229283585.tab") > > system("convert tmp/1kgh11229283585.ps tmp/1kgh11229283585.png") > system("convert tmp/25aqc1229283585.ps tmp/25aqc1229283585.png") > > > proc.time() user system elapsed 0.544 0.315 0.637