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(14929387.5,14717825.3,15826281.2,16301309.6,15033016.9,16998460.6,14066462.7,13328937.3,17319718.2,17586426.8,15887037.4,17935679.1,15869489,15892510.9,17556558.1,16791643,15953688.5,18144913.6,14390881,13885708.7,17332571.5,17152595.8,16003877.1,16841467.1,14783398.1,14667847.5,17714362.2,16282088,15014866.2,17722582.4,13876509.4,15495489.6,17799521.1,17920079.1,17248022.4,18813782.4,16249688.3,17823358.5,20424438.3,17814218.7,19699959.6,19776328.1,15679833.1,17119266.5,20092613,20863688.3,20925203.1,21032593,20664684.3,19711511.4,22553293.4,19498332.9,20722827.8,21321275,17960847.7,17789654.9,20003708.5,21169851.7,20422839.4,19810562.3) > 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/1dzow1228854445.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/2tj7y1228854445.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.61009883 0.47408691 0.59904209 0.40996508 0.46871605 [7] 0.66984199 0.38309030 0.29138890 0.39546721 0.18352929 0.27254253 [13] 0.48854948 0.17386693 0.07000833 0.13397885 -0.03805874 0.05034329 [19] 0.20125854 -0.03014376 -0.08256392 -0.01909238 -0.18578869 -0.06451461 [25] 0.06825515 -0.16544628 -0.18149186 -0.14979749 -0.25890001 -0.17765916 [31] -0.09066116 -0.24682068 -0.23045359 -0.21301470 -0.30499303 -0.17713985 [37] -0.09513875 -0.21837811 -0.24770336 -0.22055900 -0.27015552 -0.20044193 [43] -0.14714612 -0.23648439 -0.24330849 -0.22273368 -0.25957808 -0.19147728 [49] -0.13891669 -0.17331003 -0.17936624 -0.15955946 -0.15767285 -0.10929408 [55] -0.06269023 -0.07626672 -0.08067133 -0.07101892 -0.04603347 -0.01958513 > (mypacf <- c(rpacf$acf)) [1] 0.6100988305 0.1622645163 0.4216574980 -0.1735660241 0.3369178692 [6] 0.3309642489 -0.3234238625 -0.0995507021 -0.0155806278 -0.1701584942 [11] 0.1757525735 0.2164377196 -0.2975118666 -0.1764414491 -0.1504300721 [16] 0.0585961338 0.0289995886 -0.0138508336 0.0702930378 -0.0303449545 [21] -0.0297129392 -0.0129473813 0.0522543140 -0.0824924750 -0.0819852072 [26] 0.0697216436 -0.0489930169 0.0635661687 -0.1977741373 -0.0678194875 [31] 0.0347986833 0.0531769269 -0.0144699665 0.0445159221 -0.0002954292 [36] 0.0434038757 0.0442576822 -0.2301244409 0.0677543631 -0.0746281832 [41] -0.0320565943 0.0203004935 -0.0496787906 -0.0842406693 0.0149249832 [46] -0.0169426830 -0.0389233181 0.0009139769 0.0829034100 0.1756131459 [51] -0.0247139795 -0.0077235484 0.0123585141 -0.0555646603 0.0100996916 [56] 0.0171837329 -0.0039238998 -0.0191047359 -0.0204248836 > 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/3cedz1228854445.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/4ol0o1228854445.tab") > > system("convert tmp/1dzow1228854445.ps tmp/1dzow1228854445.png") > system("convert tmp/2tj7y1228854445.ps tmp/2tj7y1228854445.png") > > > proc.time() user system elapsed 0.595 0.333 0.708