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(0.89,0.88,0.87,0.87,0.87,0.87,0.88,0.87,0.86,0.86,0.86,0.84,0.84,0.83,0.84,0.88,0.9,0.89,0.91,0.94,0.94,0.95,0.95,0.98,0.96,1,1.05,1.03,1.07,1.12,1.1,1.06,1.11,1.08,1.07,1.02,1,1.04,1.02,1.07,1.12,1.08,1.02,1.01,1.04,0.98,0.95,0.94,0.94,0.96,0.97,1.03,1.01,0.99,1,1,1.02,1.01,0.99,0.98,1.01,1.03,1.03,1,0.96,0.97,0.98,1.02,1.04,1.01,1.01,1,1.01,1.02,1.03,1.06,1.12,1.12,1.13,1.13,1.13,1.17,1.14,1.08,1.07,1.12,1.14,1.21,1.2,1.23,1.29,1.31,1.37,1.35,1.26,1.26) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1n51i1228767838.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/2gprg1228767838.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.120155875 -0.148424744 0.012544050 -0.093750949 [6] 0.022528771 -0.044801936 -0.071283945 -0.144852279 -0.128338797 [11] 0.058188760 0.372056916 0.070057888 -0.146212543 0.113329826 [16] -0.069128615 -0.066151855 -0.019177766 -0.114333295 -0.008942585 [21] -0.074448519 -0.033199211 0.033918952 -0.031336523 0.021302714 [26] 0.122161306 -0.088813702 -0.136513181 0.024586805 -0.032797095 [31] 0.040236675 0.017213387 -0.083356831 -0.062382790 -0.051665648 [36] 0.030682818 0.144255195 0.032104221 0.007506619 -0.010161612 [41] -0.072960201 0.122249939 0.020165039 -0.186409043 -0.105694525 [46] -0.123994868 -0.028741791 0.070101201 0.084658716 > (mypacf <- c(rpacf$acf)) [1] 0.1201558747 -0.1652479340 0.0554745924 -0.1338993318 0.0713419432 [6] -0.1056648525 -0.0231392689 -0.1876244194 -0.0856785650 0.0145281580 [11] 0.3707741071 -0.0622016347 -0.0488556621 0.1025003991 -0.0991778649 [16] -0.0633813825 -0.0548885990 -0.0522153230 0.0983044017 -0.0352066998 [21] -0.0692259026 -0.1434608831 -0.0392024827 0.0483135896 0.0256302033 [26] -0.1387397201 -0.0354113411 0.0005865092 -0.0028516919 -0.0188306821 [31] -0.0121607183 -0.0168139706 -0.0575813329 -0.0606762352 -0.0813294583 [36] 0.0803441038 0.1156786594 0.1092404654 -0.1273400195 -0.0869349050 [41] 0.1233430906 -0.0710880755 -0.1949865286 -0.0849916016 -0.0684743391 [46] 0.0343289775 -0.0928349945 -0.0374638591 > 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/3rt3z1228767838.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/4bvvh1228767838.tab") > > system("convert tmp/1n51i1228767838.ps tmp/1n51i1228767838.png") > system("convert tmp/2gprg1228767838.ps tmp/2gprg1228767838.png") > > > proc.time() user system elapsed 0.579 0.321 0.682