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(108.4,117,103.8,100.8,110.6,104.0,112.6,107.3,98.9,109.8,104.9,102.2,123.9,124.9,112.7,121.9,100.6,104.3,120.4,107.5,102.9,125.6,107.5,108.8,128.4,121.1,119.5,128.7,108.7,105.5,119.8,111.3,110.6,120.1,97.5,107.7,127.3,117.2,119.8,116.2,111.0,112.4,130.6,109.1,118.8,123.9,101.6,112.8,128.0,129.6,125.8,119.5,115.7,113.6,129.7,112.0,116.8,127.0,112.9,113.3,121.7) > par5 = '12' > par4 = '1' > par3 = '0' > 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/1kt431197837820.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/2ko5c1197837820.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.092143631 -0.017240406 0.224639324 -0.043174502 [6] 0.019744126 0.176365534 -0.132288889 0.011885954 0.186011384 [11] -0.187299007 -0.126394104 -0.141292339 -0.118848922 0.094644116 [16] -0.112546772 -0.122585801 0.136814292 -0.067802463 -0.171371169 [21] 0.047039395 0.032039589 -0.117217861 0.122444217 -0.202072149 [26] -0.151054259 0.063362124 0.020455988 -0.050171242 0.089648830 [31] 0.050361901 0.033114303 0.031692345 -0.157199071 0.065516751 [36] 0.065255823 -0.016266701 0.132884576 0.008108293 -0.097980726 [41] 0.041653718 -0.069454986 -0.108466164 0.085985281 0.028110506 [46] -0.071428889 0.015631354 -0.037355838 -0.056041098 > (mypacf <- c(rpacf$acf)) [1] 0.092143631 -0.025951192 0.230773853 -0.093642986 0.053258216 [6] 0.118455871 -0.145251275 0.045606138 0.118953384 -0.171829955 [11] -0.114234703 -0.222865872 0.041391884 0.116504126 -0.147156099 [16] 0.014197054 0.122337742 -0.062371855 -0.139008206 0.014569464 [21] 0.192375521 -0.229692182 -0.021591575 -0.190327450 -0.017132811 [26] -0.068493755 0.099875853 0.076180349 0.067508561 -0.018541572 [31] 0.034100301 -0.025914070 -0.109614280 -0.010198134 -0.037396303 [36] -0.028254991 0.029803436 -0.020854525 0.002172382 -0.047728786 [41] 0.002313154 0.031172094 -0.008875676 -0.044600311 0.006792897 [46] -0.089987443 0.023498125 -0.129852835 > 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/3z41g1197837820.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/42f8v1197837820.tab") > > system("convert tmp/1kt431197837820.ps tmp/1kt431197837820.png") > system("convert tmp/2ko5c1197837820.ps tmp/2ko5c1197837820.png") > > > proc.time() user system elapsed 0.858 0.329 1.002