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(102.86,102.12,100.74,100.96,101.01,100.41,100.35,99.33,98.66,98.69,98.61,96.41,96.3,96.12,97.32,101.78,102.28,101.12,104.55,107.4,108.41,109.43,110.34,115.06,113.13,116.56,121.39,119.12,123.31,128.57,127.71,125.68,133.8,130.97,129.99,124,118.63,121.86,119.97,125.03,130.09,126.65,121.7,119.24,122.63,116.66,114.12,113.11,112.61,113.4,115.18,121.01,119.44,116.68,117.07,117.41,119.58,120.92,117.09,116.77,119.39,122.49,124.08,118.29,112.94,113.79,114.43,118.7,120.36,118.27,118.34,117.82,117.65,118.18,121.02,124.78,131.16,130.14,131.75,134.73,135.35,140.32,136.35,131.6,128.9,133.89,138.25,146.23,144.76,149.3,156.8,159.08,165.12,163.14,153.43,151.01) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '24' > #'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/1ggf01196437498.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/24edq1196437498.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.947915304 0.881906471 0.804255681 0.724532266 [6] 0.658856477 0.591290390 0.529875975 0.475876326 0.425210529 [11] 0.388688027 0.354302507 0.308004695 0.254537954 0.199774267 [16] 0.136852586 0.089399293 0.045585482 0.004610855 -0.029372234 [21] -0.064290515 -0.086600605 -0.099772499 -0.109182263 -0.110974262 > (mypacf <- c(rpacf$acf)) [1] 0.947915304 -0.163981010 -0.135325639 -0.039071155 0.110919466 [6] -0.091964601 -0.002341145 0.028575595 -0.008040744 0.075292776 [11] -0.032966396 -0.172938390 -0.086332094 0.028293345 -0.123993476 [16] 0.106396518 -0.014398068 -0.049853984 -0.004577184 -0.021366029 [21] 0.033874232 0.025683130 0.015269339 0.016373838 > 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/33ozz1196437498.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/4nevl1196437498.tab") > > system("convert tmp/1ggf01196437498.ps tmp/1ggf01196437498.png") > system("convert tmp/24edq1196437498.ps tmp/24edq1196437498.png") > > > proc.time() user system elapsed 0.851 0.340 1.010