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(9568.3 + ,9920.3 + ,11353.5 + ,9247.5 + ,10114.2 + ,10763.1 + ,8456.1 + ,8071.6 + ,10328 + ,10551.4 + ,10186.1 + ,8821.6 + ,9841.3 + ,10233.6 + ,10794.6 + ,10289.3 + ,10513.4 + ,10607.6 + ,9707.4 + ,8103.5 + ,10982.6 + ,11836.9 + ,10517.5 + ,9810.5 + ,10374.8 + ,10855.3 + ,11671.3 + ,11901.2 + ,10846.4 + ,11917.5 + ,11362.8 + ,9314.5 + ,12605.9 + ,12815.1 + ,11254.5 + ,11111.8 + ,11282.9 + ,11554.5 + ,12935.6 + ,12146.3 + ,11615.3 + ,13214.8 + ,11735.5 + ,9522.3 + ,12694.8 + ,12317.6 + ,11450 + ,11380.9 + ,10604.6 + ,10972.2 + ,13331.5 + ,11733.1 + ,11284.7 + ,13295.8 + ,11881.4 + ,10374.2 + ,13828 + ,13490.5 + ,13092.2 + ,13184.4 + ,12398.4 + ,13882.3 + ,15861.5 + ,13286.1 + ,15634.9 + ,14211 + ,13646.8 + ,12224.6 + ,15916.4 + ,16535.9 + ,15796 + ,14418.6 + ,15044.5 + ,14944.2 + ,16754.8 + ,14254 + ,15454.9 + ,15644.8 + ,14568.3 + ,12520.2 + ,14803 + ,15873.2 + ,14755.3 + ,12875.1 + ,14291.1 + ,14205.3 + ,15859.4 + ,15258.9 + ,15498.6 + ,15106.5 + ,15023.6 + ,12083 + ,15761.3 + ,16943 + ,15070.3 + ,13659.6 + ,14768.9 + ,14725.1 + ,15998.1 + ,15370.6 + ,14956.9 + ,15469.7 + ,15101.8 + ,11703.7 + ,16283.6 + ,16726.5 + ,14968.9 + ,14861 + ,14583.3 + ,15305.8 + ,17903.9 + ,16379.4 + ,15420.3 + ,17870.5 + ,15912.8 + ,13866.5 + ,17823.2 + ,17872 + ,17420.4 + ,16704.4 + ,15991.2 + ,16583.6 + ,19123.5 + ,17838.7 + ,17209.4 + ,18586.5 + ,16258.1 + ,15141.6 + ,19202.1 + ,17746.5 + ,19090.1 + ,18040.3 + ,17515.5 + ,17751.8 + ,21072.4 + ,17170 + ,19439.5 + ,19795.4 + ,17574.9 + ,16165.4 + ,19464.6 + ,19932.1 + ,19961.2 + ,17343.4 + ,18924.2 + ,18574.1 + ,21350.6 + ,18594.6 + ,19823.1 + ,20844.4 + ,19640.2 + ,17735.4 + ,19813.6 + ,22238.5 + ,20682.2 + ,17818.6 + ,21872.1 + ,22117 + ,21865.9 + ,23451.3 + ,20953.7 + ,22497.3) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '0.3' > 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/12n121228661972.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/2cstw1228661972.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.424774718 0.508462272 0.598917078 0.311715032 [6] 0.359290527 0.368500918 0.086673264 0.189508106 0.138438309 [11] -0.081261070 -0.081682945 -0.149495190 -0.268652772 -0.178304887 [16] -0.219197711 -0.370291769 -0.201490491 -0.260266961 -0.348910594 [21] -0.187369596 -0.274774709 -0.321663214 -0.047435703 -0.272461596 [26] -0.185376052 -0.027943897 -0.155695525 -0.090411286 0.033847692 [31] -0.118388175 0.021652618 0.085433762 -0.061894882 0.047333030 [36] 0.082361409 -0.042357404 0.118668202 0.075414090 -0.031347743 [41] 0.104624742 0.066856395 -0.058531214 0.102641942 -0.006369827 [46] -0.072721425 0.154301708 -0.050301773 -0.065576701 0.107868930 [51] -0.081952339 0.002760384 0.062746101 -0.071246013 0.056531874 [56] 0.045417336 -0.047711717 0.051851403 0.004573696 -0.015284120 [61] 0.059497950 > (mypacf <- c(rpacf$acf)) [1] 4.247747e-01 4.002466e-01 4.349525e-01 -1.227922e-01 -9.310384e-02 [6] 3.909929e-02 -2.344466e-01 -5.289067e-02 3.181606e-02 -1.276628e-01 [11] -2.584431e-01 -1.531995e-01 -2.717522e-02 1.159807e-01 1.514153e-01 [16] -1.313118e-01 5.815008e-03 2.162238e-02 -7.613564e-02 3.045983e-02 [21] -1.557816e-03 -1.736567e-01 9.183287e-02 -1.403738e-01 -3.456224e-02 [26] 6.102256e-02 6.705433e-02 -8.232818e-02 -1.474164e-02 -1.086248e-02 [31] 1.726392e-02 3.399138e-02 -8.489406e-02 -8.537538e-02 -2.654545e-02 [36] -5.600749e-02 9.749721e-02 4.536315e-02 -2.788038e-02 -1.249699e-01 [41] 4.487439e-03 -4.021319e-02 7.007150e-02 -1.034409e-02 -1.106747e-01 [46] 6.704235e-02 -1.371451e-02 -8.371297e-02 6.277358e-02 -3.031586e-04 [51] 7.601936e-02 -1.027540e-01 2.356700e-02 8.712310e-02 -9.400609e-02 [56] -6.105895e-02 2.431242e-02 -7.533502e-02 6.674378e-02 -3.019549e-05 > 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/3zzc01228661972.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/4a49b1228661972.tab") > > system("convert tmp/12n121228661972.ps tmp/12n121228661972.png") > system("convert tmp/2cstw1228661972.ps tmp/2cstw1228661972.png") > > > proc.time() user system elapsed 0.599 0.316 0.866