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(97.7,101.5,119.6,108.1,117.8,125.5,89.2,92.3,104.6,122.8,96.0,94.6,93.3,101.1,114.2,104.7,113.3,118.2,83.6,73.9,99.5,97.7,103.0,106.3,92.2,101.8,122.8,111.8,106.3,121.5,81.9,85.4,110.9,117.3,106.3,105.5,101.3,105.9,126.3,111.9,108.9,127.2,94.2,85.7,116.2,107.2,110.6,112.0,104.5,112.0,132.8,110.8,128.7,136.8,94.9,88.8,123.2,125.3,122.7,125.7,116.3,118.7,142.0,127.9,131.9,152.3,110.8,99.1,135.0,133.2,131.0,133.9,119.9,136.9,148.9,145.1,142.4,159.6,120.7,109.0,142.0) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/13ne51229448613.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/25llt1229448613.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.508557698 0.066807885 -0.051840338 -0.023665961 [6] 0.027630110 -0.001713684 0.003863811 -0.072845519 0.024559954 [11] 0.120073740 0.176619575 -0.435303551 0.216596482 -0.091103405 [16] -0.033685972 0.171099358 -0.078729955 -0.069027185 0.097492609 [21] -0.047695176 0.105800657 -0.148861806 -0.045636785 0.150999691 [26] -0.147893329 0.159439071 0.051377255 -0.198455125 0.073264750 [31] 0.095328631 -0.127963616 0.036962095 -0.039554967 0.079658563 [36] 0.008557484 -0.060400733 > (mypacf <- c(rpacf$acf)) [1] -0.508557698 -0.258741637 -0.203341611 -0.206605672 -0.151237019 [6] -0.113202244 -0.088630600 -0.188747804 -0.210798487 -0.007997522 [11] 0.439123715 -0.069789102 -0.089629089 -0.068295525 -0.226219284 [16] -0.032941967 0.045934289 -0.114106955 0.021342402 -0.157469795 [21] -0.093794514 -0.030516119 -0.025701022 0.030853823 -0.066249982 [26] -0.084565571 0.083053432 0.014579581 -0.051112270 0.112527618 [31] 0.033784478 -0.144180978 -0.038780750 0.058034604 0.088946245 [36] 0.024816643 > 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/330wp1229448613.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/4w2wr1229448614.tab") > > system("convert tmp/13ne51229448613.ps tmp/13ne51229448613.png") > system("convert tmp/25llt1229448613.ps tmp/25llt1229448613.png") > > > proc.time() user system elapsed 0.562 0.325 3.428