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(29.59,30.7,30.52,32.67,33.19,37.13,35.54,37.75,41.84,42.94,49.14,44.61,40.22,44.23,45.85,53.38,53.26,51.8,55.3,57.81,63.96,63.77,59.15,56.12,57.42,63.52,61.71,63.01,68.18,72.03,69.75,74.41,74.33,64.24,60.03,59.44,62.5,55.04,58.34,61.92,67.65,67.68,70.3,75.26,71.44,76.36,81.71,92.6,90.6,92.23,94.09,102.79,109.65,124.05,132.69,135.81,116.07,101.42,75.73,55.48) > 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/1imym1229697848.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/26f311229697848.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.0000000000 0.9402004281 0.8448306873 0.7336971489 0.6276002711 [6] 0.5367853041 0.4656972324 0.4045649294 0.3445770605 0.2902041061 [11] 0.2423099009 0.2024001587 0.1570573011 0.1150818765 0.0821159864 [16] 0.0524638033 0.0261947845 0.0088657065 -0.0021083145 -0.0018181595 [21] 0.0076810378 0.0278763360 0.0430070978 0.0428584429 0.0338026153 [26] 0.0168397621 -0.0041758521 -0.0360638261 -0.0627040837 -0.0811511104 [31] -0.0923647864 -0.0997537090 -0.0978197019 -0.0982178986 -0.1119590504 [36] -0.1311941349 -0.1589715201 -0.1880154624 -0.2272253929 -0.2601060544 [41] -0.2870260966 -0.3088421015 -0.3265194861 -0.3406458367 -0.3437550392 [46] -0.3497012017 -0.3560427192 -0.3599082536 -0.3578099614 -0.3539720193 [51] -0.3416293362 -0.3272282420 -0.2999193961 -0.2655930023 -0.2146380666 [56] -0.1514732109 -0.0840130840 -0.0347259932 0.0001364833 0.0102436429 > (mypacf <- c(rpacf$acf)) [1] 0.940200428 -0.337399529 -0.110778517 0.039128388 0.050845986 [6] 0.048220469 -0.053265762 -0.077334799 0.030649963 0.019623483 [11] 0.009957439 -0.136158401 0.020331499 0.070318166 -0.041139795 [16] -0.032144721 0.035111499 0.014365107 0.088786076 0.015890758 [21] 0.044535196 -0.083349568 -0.088809719 0.025898903 -0.034566954 [26] -0.025797335 -0.130712791 0.048658538 0.071970674 -0.009953206 [31] -0.051997551 0.037378669 -0.035485975 -0.085942779 -0.024158204 [36] -0.087938326 0.005550598 -0.124465357 0.037055916 -0.031567771 [41] -0.049029059 -0.040440213 -0.075162248 0.098547188 -0.095357308 [46] -0.076023767 0.004332553 0.061290928 0.006090956 -0.008266665 [51] -0.088559860 0.151963723 0.022247570 0.084966794 0.051985884 [56] 0.012586637 -0.100441591 -0.013886071 -0.098112408 > 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/3sdby1229697848.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/4ncp01229697848.tab") > > system("convert tmp/1imym1229697848.ps tmp/1imym1229697848.png") > system("convert tmp/26f311229697848.ps tmp/26f311229697848.png") > > > proc.time() user system elapsed 0.616 0.318 1.001