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(104,85,110,106,142,138,115,118,118,128,119,114,108,130,109,127,121,131,111,108,122,134,144,125,118,93,106,109,121,137,153,140,135,124,137,113,97,105,101,120,117,123,133,104,136,116,110,91,99,67,102,101,107,114,129,112,97,100,105,81,104,80,97,90,99,103,111,110,88,97,87,97) > par5 = '12' > par4 = '1' > par3 = '0' > 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/16hz01196158377.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/2oqtr1196158377.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.0000000000 0.2100203715 0.2381450496 -0.0885204344 -0.1305229065 [6] -0.1609948842 0.0008491937 0.2746220401 0.2698147110 0.3208058185 [11] 0.1475273813 0.0632140037 -0.3673117640 -0.0290196505 -0.0987410875 [16] -0.0224115042 0.1168179269 0.1614286368 0.0782253911 -0.0858858739 [21] -0.0782185243 -0.0572067020 -0.0176716985 -0.0540491205 0.1029023656 [26] -0.1383802374 -0.0905249665 -0.0747605205 -0.1484646989 -0.0612684116 [31] -0.0348661547 0.0676430869 -0.0112798563 -0.0928236264 -0.1846962015 [36] -0.0908334001 -0.2097725946 0.0013693535 -0.0368392140 0.0027530128 [41] 0.0554093182 0.0198730787 -0.0186330499 -0.0939967039 -0.1179395035 [46] 0.0042946084 -0.0490437987 0.0392855099 0.0375567941 > (mypacf <- c(rpacf$acf)) [1] 0.210020371 0.202990093 -0.186595144 -0.145765537 -0.053213720 [6] 0.107993524 0.330429986 0.141682819 0.101746606 0.022911982 [11] 0.042631502 -0.362675983 0.163736102 0.080881395 -0.241693002 [16] -0.036663164 0.042198411 -0.095474522 -0.017985625 0.021711852 [21] 0.160500234 0.146075342 -0.138930941 -0.119767623 -0.076503034 [26] -0.116391868 -0.058740615 -0.067975022 0.006363290 -0.061964148 [31] -0.039176497 0.052576365 0.039819650 -0.105580897 0.106744218 [36] 0.033781388 -0.052399434 -0.147533128 -0.081815885 0.034206651 [41] 0.163787907 0.006833194 -0.005648199 -0.059603628 0.089232669 [46] -0.079116891 0.164312065 -0.081576048 > 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/3wed31196158377.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/4p9xn1196158377.tab") > > system("convert tmp/16hz01196158377.ps tmp/16hz01196158377.png") > system("convert tmp/2oqtr1196158377.ps tmp/2oqtr1196158377.png") > > > proc.time() user system elapsed 0.895 0.318 1.062