R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(0.86,0.88,0.93,0.98,0.97,1.03,1.06,1.06,1.08,1.09,1.04,1.00,1.01,1.02,1.04,1.06,1.06,1.06,1.06,1.06,1.02,0.98,0.99,0.99,0.94,0.96,0.98,1.01,1.01,1.02,1.04,1.03,1.05,1.08,1.17,1.11,1.11,1.11,1.11,1.21,1.31,1.37,1.37,1.26,1.23,1.17,1.06,0.95,0.92,0.92,0.90,0.93,0.93,0.97,0.96,0.99,0.98,0.96,1.00,0.99,1.03) > par8 = '' > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1.0' > 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/rcomp/tmp/18zyc1293031835.ps",horizontal=F,onefile=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/rcomp/tmp/28zyc1293031835.ps",horizontal=F,onefile=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.410922820 0.217780389 0.083617677 -0.073801204 [6] -0.145825385 -0.229492912 -0.097979837 -0.158757433 -0.121032031 [11] -0.055701373 0.057118260 -0.015028002 -0.107180062 -0.009788243 [16] -0.111996612 -0.158490892 -0.119971973 -0.137548641 -0.007607341 [21] -0.084072169 0.011717355 0.052036949 0.009845976 0.108275473 [26] 0.133441933 0.194591364 0.091421617 0.037190541 -0.075638756 [31] -0.102005158 0.006221229 0.023406734 0.064397766 0.052787739 [36] 0.094709629 0.146428408 0.091953172 0.007644728 0.007678046 [41] -0.109866577 -0.153369906 -0.134215867 -0.091363121 -0.113273616 [46] -0.083773329 0.004462519 -0.009848520 0.003293098 -0.006592554 [51] 0.019245344 -0.006068120 0.017007727 0.022153129 -0.012972486 [56] 0.025134415 0.002552482 0.016350277 0.014033562 0.005841764 > (mypacf <- c(rpacf$acf)) [1] 0.410922820 0.058862143 -0.029934251 -0.132112653 -0.091607807 [6] -0.139916070 0.088738052 -0.129731588 -0.036159659 -0.014929162 [11] 0.101253886 -0.131492707 -0.133879538 0.032005424 -0.116764999 [16] -0.118686376 -0.024768381 -0.139376426 0.079171123 -0.144115030 [21] -0.025393898 -0.046171514 -0.060695671 0.064593423 0.027999590 [26] 0.055799858 -0.023286646 -0.092793714 -0.126038172 -0.041589640 [31] 0.120353372 0.057816635 -0.043569477 0.031472092 0.036766101 [36] 0.090536311 0.038231390 -0.118054641 0.120671477 -0.073404449 [41] -0.008897503 0.004201468 0.003807752 -0.026819088 -0.047319040 [46] 0.021598169 -0.032994068 0.007797338 0.034509940 -0.089632178 [51] 0.003114844 0.066180042 -0.069598150 0.003622615 0.066082974 [56] -0.047915621 -0.033835691 -0.108968468 0.008424045 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3bhf01293031835.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/rcomp/tmp/4f0d61293031835.tab") > > try(system("convert tmp/18zyc1293031835.ps tmp/18zyc1293031835.png",intern=TRUE)) character(0) > try(system("convert tmp/28zyc1293031835.ps tmp/28zyc1293031835.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.680 0.410 1.073