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(9.733,9.259,9.864,9.215,10.103,9.380,9.896,10.117,9.451,9.700,9.081,9.084,9.743,8.587,9.731,9.563,9.998,9.437,10.038,9.918,9.252,9.737,9.035,9.133,9.487,8.700,9.627,8.947,9.283,8.829,9.947,9.628,9.318,9.605,8.640,9.214,9.567,8.547,9.185,9.470,9.123,9.278,10.170,9.434,9.655,9.429,8.739,9.552,9.687,9.019,9.672,9.206,9.069,9.788,10.312,10.105,9.863,9.656,9.295,9.946,9.701,9.049,10.190,9.706,9.765,9.893,9.994,10.433,10.073,10.112,9.266,9.820,10.097,9.115,10.411,9.678,10.408,10.153,10.368,10.581,10.597,10.680,9.738,9.556) > 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/1q01y1228943958.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/24zcc1228943958.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.594422008 0.136604181 0.133821603 -0.261539069 [6] 0.167194934 -0.095916536 0.061833293 -0.188647869 0.195622151 [11] -0.018554043 -0.347808938 0.660905845 -0.476403901 0.209228542 [16] 0.062014725 -0.219093071 0.122176416 -0.010596959 -0.039377403 [21] -0.064178959 0.111229684 -0.073692549 -0.146870901 0.426802737 [26] -0.353859112 0.172819655 0.067055633 -0.186433640 0.112139553 [31] -0.048550807 -0.084209488 0.073990647 0.012759179 -0.038379002 [36] -0.096751752 0.263634482 -0.222547575 0.144300755 0.023310666 [41] -0.160489334 0.172106720 -0.145613419 0.031037090 0.009779818 [46] -0.051779889 0.090838638 -0.171221878 0.264522953 > (mypacf <- c(rpacf$acf)) [1] -5.944220e-01 -3.351568e-01 7.493161e-02 -1.340079e-01 -1.162569e-01 [6] -1.433157e-01 1.201654e-02 -3.243215e-01 -1.527660e-01 6.068578e-02 [11] -5.284742e-01 2.019359e-01 1.799281e-01 9.537925e-02 1.519610e-02 [16] 9.614202e-02 -1.117436e-01 1.332645e-02 -1.673039e-02 8.831991e-02 [21] -9.450822e-02 -9.059177e-02 -4.354865e-02 7.990734e-02 8.451562e-02 [26] -1.923258e-02 4.227598e-02 8.574059e-02 5.109105e-02 -1.330384e-01 [31] -1.521909e-01 1.668525e-02 3.117711e-05 3.527633e-02 2.252592e-03 [36] -8.627365e-02 -8.731143e-02 1.085914e-02 -2.255740e-02 -8.928969e-02 [41] 4.496765e-02 -1.263513e-01 9.771753e-02 1.889955e-02 -1.697948e-01 [46] -3.043921e-02 -6.452211e-02 4.718534e-02 > 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/342e51228943958.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/4ljqh1228943958.tab") > > system("convert tmp/1q01y1228943958.ps tmp/1q01y1228943958.png") > system("convert tmp/24zcc1228943958.ps tmp/24zcc1228943958.png") > > > proc.time() user system elapsed 0.569 0.312 0.984