R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(1.1,1.3,1.2,1.6,1.7,1.5,0.9,1.5,1.4,1.6,1.7,1.4,1.8,1.7,1.4,1.2,1.0,1.7,2.4,2.0,2.1,2.0,1.8,2.7,2.3,1.9,2.0,2.3,2.8,2.4,2.3,2.7,2.7,2.9,3.0,2.2,2.3,2.8,2.8,2.8,2.2,2.6,2.8,2.5,2.4,2.3,1.9,1.7,2.0,2.1,1.7,1.8,1.8,1.8,1.3,1.3,1.3,1.2,1.4,2.2) > par5 = '12' > par4 = '1' > par3 = '1' > 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/1f7bu1197322346.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/27x971197322346.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.113244237 -0.395214367 0.015785876 -0.117146404 [6] 0.369670818 0.025902697 -0.309473104 0.023039876 -0.088477154 [11] 0.312085671 0.257132029 -0.572458158 -0.063536922 0.246257455 [16] 0.024591228 0.114606433 -0.280448086 -0.081629423 0.150610170 [21] 0.017391789 0.096577510 -0.117618280 -0.164264373 0.148783087 [26] 0.085204005 -0.093133692 -0.018430232 -0.053038857 0.014851141 [31] 0.040853715 0.006372247 0.013216596 -0.020692668 0.018671919 [36] 0.045002981 -0.028081039 -0.047674617 0.026181134 -0.003659127 [41] -0.008311832 0.096570070 0.030702174 -0.034296821 -0.035749424 [46] -0.018690181 -0.014791621 > (mypacf <- c(rpacf$acf)) [1] -0.1132442367 -0.4133393945 -0.1151808170 -0.3684172770 0.3326794371 [6] -0.1028099448 0.0313769078 -0.1256794144 -0.1486386285 0.2387500152 [11] 0.2399617245 -0.3144714219 -0.0060998219 -0.0136596127 -0.0395351608 [16] -0.0857390079 -0.0346208599 0.0006365208 -0.1746730852 0.0140050201 [21] -0.1978822834 0.1802569804 0.0334681398 -0.1282244895 -0.0606665011 [26] -0.0712787569 0.0479459667 -0.0372876863 -0.1193728417 -0.1144509462 [31] 0.0088538796 -0.0444399061 0.0171801061 0.0573823353 0.1144186614 [36] -0.1464885648 0.0029317497 -0.1236409110 0.0578592253 0.0415424583 [41] 0.0560802477 0.0234141642 0.0341792397 -0.0083281605 -0.0452269272 [46] -0.0934917398 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3ssde1197322346.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4y3w11197322346.tab") > > system("convert tmp/1f7bu1197322346.ps tmp/1f7bu1197322346.png") > system("convert tmp/27x971197322346.ps tmp/27x971197322346.png") > > > proc.time() user system elapsed 0.870 0.322 0.983