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(6340.5,7901.5,8191.1,7181.7,7594.4,7384.7,7876.7,8463.4,8317.2,7778.7,8532.8,7272.2,6680.1,8427.6,8752.8,7952.7,8694.3,7787,8474.2,9154.7,8557.2,7951.1,9156.7,7865.7,7337.4,9131.7,8814.6,8598.8,8439.6,7451.8,8016.2,9544.1,8270.7,8102.2,9369,7657.7,7816.6,9391.3,9445.4,9533.1,10068.7,8955.5,10423.9,11617.2,9391.1,10872,10230.4,9221,9428.6,10934.5,10986,11724.6,11180.9,11163.2,11240.9,12107.1,10762.3,11340.4,11266.8,9542.7,9227.7,10571.9,10774.4,10392.8,9920.2,9884.9,10174.5,11395.4,10760.2,10570.1,10536,9902.6,8889,10837.3,11624.1,10509,10984.9,10649.1,10855.7,11677.4,10760.2,10046.2,10772.8,9987.7,8638.7,11063.7,11855.7,10684.5,11337.4,10478,11123.9,12909.3,11339.9,10462.2,12733.5,10519.2,10414.9,12476.8,12384.6,12266.7,12919.9,11497.3,12142,13919.4,12656.8,12034.1,13199.7,10881.3,11301.2,13643.9,12517,13981.1,14275.7,13435,13565.7,16216.3,12970,14079.9,14235,12213.4,12581) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > 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/1v6s21229253056.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/2mtu31229253056.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.808707216 0.752771931 0.802896111 0.687504957 [6] 0.675460655 0.708679545 0.579926090 0.572739813 0.601017577 [11] 0.475139865 0.537070388 0.609198209 0.457671047 0.423940597 [16] 0.449093120 0.361532884 0.380481796 0.389950414 0.289374840 [21] 0.306825008 0.310177984 0.212776681 0.280022512 0.321302898 [26] 0.212824676 0.188634797 0.184875149 0.136294532 0.154054695 [31] 0.140017277 0.077033933 0.092908352 0.086473754 0.035679149 [36] 0.082245803 0.109755888 0.048232938 0.006139143 0.015667070 [41] -0.006497719 0.001531918 0.004644933 -0.022124470 -0.021933789 [46] -0.017992741 -0.035309315 -0.021477598 0.024774656 -0.021249405 [51] -0.071446310 -0.033276459 -0.044965256 -0.056553725 -0.017348295 [56] -0.043326281 -0.048058764 -0.011571320 -0.034969675 -0.024658382 [61] 0.037503152 > (mypacf <- c(rpacf$acf)) [1] 0.808707216 0.285452808 0.431252264 -0.207434227 0.154615459 [6] 0.095575038 -0.230083863 0.067297518 0.052447429 -0.166478622 [11] 0.330146172 0.215883117 -0.321350932 -0.313277498 0.055099325 [16] 0.146771640 -0.016685380 -0.008183868 0.072832375 -0.046737713 [21] -0.016581851 -0.010018901 0.047229217 -0.004124229 -0.004326196 [26] -0.147691523 -0.098088636 0.114748106 -0.015429669 -0.058182306 [31] 0.092516064 0.004844006 0.011306742 0.037946315 -0.028432771 [36] -0.084782472 0.010515126 -0.090347475 0.066253543 -0.021632567 [41] 0.044376673 0.047859834 0.103075148 -0.080395591 -0.087758850 [46] 0.070427629 -0.050231870 -0.025559906 -0.010965159 -0.006646715 [51] 0.132834880 -0.046419927 -0.029255287 0.068890849 0.011223898 [56] 0.040232946 -0.057379369 -0.004015767 -0.005634730 -0.059993045 > 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/3mtam1229253057.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/4cb7y1229253057.tab") > > system("convert tmp/1v6s21229253056.ps tmp/1v6s21229253056.png") > system("convert tmp/2mtu31229253056.ps tmp/2mtu31229253056.png") > > > proc.time() user system elapsed 0.595 0.327 0.727