R version 2.7.0 (2008-04-22) 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(7.8,7.6,7.5,7.6,7.5,7.3,7.6,7.5,7.6,7.9,7.9,8.1,8.2,8,7.5,6.8,6.5,6.6,7.6,8,8,7.7,7.5,7.6,7.7,7.9,7.8,7.5,7.5,7.1,7.5,7.5,7.6,7.7,7.7,7.9,8.1,8.2,8.2,8.1,7.9,7.3,6.9,6.6,6.7,6.9,7,7.1,7.2,7.1,6.9,7,6.8,6.4,6.7,6.7,6.4,6.3,6.2,6.5) > 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/1dqxo1228763930.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/2gwlz1228763930.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.344337934 -0.022233223 -0.298514245 -0.413015769 [6] -0.147362555 -0.027241255 0.061893584 -0.058681441 -0.099604629 [11] -0.034802478 -0.044545782 0.251049405 0.105367997 0.184870341 [16] 0.084566108 -0.051482805 -0.084823788 -0.103928794 0.011086123 [21] -0.065620431 -0.040895650 -0.103907812 -0.228273940 -0.006218405 [26] -0.015188014 0.195184736 0.253139691 0.136123660 0.092376488 [31] -0.080655018 -0.112990198 -0.166099072 -0.105861719 -0.071233649 [36] -0.036837688 0.123593089 0.042592532 -0.022702029 -0.007106842 [41] 0.021176933 0.092826279 0.066874078 0.001579517 -0.097951021 [46] -0.017945776 -0.027456971 -0.052171262 0.053984854 > (mypacf <- c(rpacf$acf)) [1] 0.34433793 -0.15974225 -0.27316274 -0.26910576 0.05251269 -0.11238631 [7] -0.09454950 -0.25709016 -0.11119686 -0.06905038 -0.19193649 0.16394709 [13] -0.20671540 0.20043790 -0.02417575 0.10185162 -0.07014412 0.15413796 [19] 0.09354062 -0.03899808 0.06557347 -0.14207498 -0.09060768 -0.09220357 [25] -0.10010976 -0.06761097 0.04026425 -0.08810646 0.07831096 -0.06413465 [31] -0.03365957 -0.04463432 -0.05477280 -0.07853654 0.06003410 0.08773624 [37] 0.02426783 -0.13490426 0.04459820 0.03842667 -0.03617323 -0.03957404 [43] -0.15264077 0.00990862 0.01053985 -0.06911338 -0.15253123 0.06401165 > 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/3crdl1228763930.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/42hit1228763930.tab") > > system("convert tmp/1dqxo1228763930.ps tmp/1dqxo1228763930.png") > system("convert tmp/2gwlz1228763930.ps tmp/2gwlz1228763930.png") > > > proc.time() user system elapsed 1.531 0.542 1.612