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.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.43,1.44,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.48,1.57,1.58,1.58,1.58,1.58,1.59,1.6,1.6,1.61,1.61,1.61,1.62,1.63,1.63,1.64,1.64,1.64,1.64,1.64,1.65,1.65,1.65,1.65) > 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/1stok1197926133.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/2kox71197926133.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.081536935 -0.050501818 -0.041387490 -0.049313775 [6] 0.050541820 0.049573785 -0.042135517 0.037555352 -0.061112200 [11] -0.062080235 0.040899472 0.022890824 -0.048653752 0.031037117 [16] -0.067630435 -0.068598470 -0.066442392 -0.051079839 0.041107480 [21] -0.050601822 -0.051569857 -0.049413779 -0.022264802 -0.023232836 [26] -0.024200871 -0.025168906 -0.026136941 -0.027104976 -0.028073011 [31] 0.333924021 0.101061638 -0.020894752 -0.031945150 -0.032913185 [36] 0.006448232 0.015562560 -0.025734926 0.003544128 -0.027670996 [41] -0.038721394 0.000640023 0.009754351 -0.031543136 -0.002264082 [46] -0.033479205 -0.044529603 -0.045497638 -0.046465673 > (mypacf <- c(rpacf$acf)) [1] 0.081536935 -0.057532582 -0.032666372 -0.046432958 0.055316990 [6] 0.034930822 -0.047833233 0.051512725 -0.066853619 -0.049052362 [11] 0.039417436 0.013487284 -0.059565307 0.041162048 -0.061000585 [16] -0.065883029 -0.070319905 -0.039544396 0.024505444 -0.077737217 [21] -0.021465380 -0.058565929 -0.015949316 -0.037571296 -0.042282443 [26] -0.032342853 -0.037126057 -0.029478479 -0.036696744 0.339150764 [31] 0.027820909 -0.003671637 -0.021617685 0.001355347 -0.040447109 [36] -0.035341878 -0.011760059 -0.052798666 -0.005933758 -0.020706666 [41] -0.026001729 -0.048404767 -0.014827265 -0.051730679 -0.025994923 [46] -0.006766014 -0.019178871 -0.013827087 > 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/3jr0p1197926133.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/4ki1i1197926133.tab") > > system("convert tmp/1stok1197926133.ps tmp/1stok1197926133.png") > system("convert tmp/2kox71197926133.ps tmp/2kox71197926133.png") > > > proc.time() user system elapsed 0.858 0.317 0.949