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(68.4,70.6,83.9,90.1,90.6,87.1,90.8,94.1,99.8,96.8,87,96.3,107.1,115.2,106.1,89.5,91.3,97.6,100.7,104.6,94.7,101.8,102.5,105.3,110.3,109.8,117.3,118.8,131.3,125.9,133.1,147,145.8,164.4,149.8,137.7,151.7,156.8,180,180.4,170.4,191.6,199.5,218.2,217.5,205,194,199.3,219.3,211.1,215.2,240.2,242.2,240.7,255.4,253,218.2,203.7,205.6,215.6) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '0.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/html/rcomp/tmp/1arus1197987199.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/2m5381197987199.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.939337707 0.879154567 0.840625775 0.809676578 [6] 0.773031479 0.715810756 0.663167115 0.615202454 0.578427987 [11] 0.544346514 0.486821672 0.430847486 0.388350875 0.359516414 [16] 0.320683234 0.256504328 0.195431513 0.142130323 0.098890170 [21] 0.062936814 0.006634749 -0.045121725 -0.091502247 -0.128479052 [26] -0.159358448 -0.202508565 -0.246802196 -0.282862746 -0.306373233 [31] -0.330567905 -0.354870599 -0.376842514 -0.391440422 -0.389824205 [36] -0.393168077 -0.408595599 -0.417572077 -0.422455629 -0.413163133 [41] -0.400793038 -0.401618044 -0.395318361 -0.387358118 -0.366795828 [46] -0.340771422 -0.327282249 -0.326137660 -0.320881818 -0.303053965 [51] -0.283279797 -0.267116152 -0.244527883 -0.219679143 -0.192343669 [56] -0.153909463 -0.116512990 -0.091541170 -0.069506968 -0.037592394 > (mypacf <- c(rpacf$acf)) [1] 0.939337707 -0.027207010 0.152190388 0.044791423 -0.034961424 [6] -0.177904794 -0.001874890 -0.049902280 0.064979723 0.017311502 [11] -0.176002670 -0.017996022 0.023565872 0.056862235 -0.080515542 [16] -0.174102126 -0.054277067 -0.059592295 -0.001575968 0.065222703 [21] -0.126819884 0.013015499 -0.071215916 -0.028351887 0.031182106 [26] -0.039768490 -0.068868033 -0.017740411 -0.004625574 -0.039432902 [31] 0.088040485 -0.017233919 0.026639659 0.058155259 -0.080701353 [36] -0.063286517 0.034866067 -0.043666136 0.062271614 0.019592708 [41] -0.072681788 0.063389537 -0.043861729 0.047342700 0.055648427 [46] -0.072851326 -0.150425218 -0.030152928 -0.038000249 0.065844371 [51] 0.051585545 0.088720641 0.013608099 -0.081145918 0.119097462 [56] 0.062558842 -0.083582809 0.012642634 -0.043608618 > 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/3gkle1197987199.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/4b4ff1197987199.tab") > > system("convert tmp/1arus1197987199.ps tmp/1arus1197987199.png") > system("convert tmp/2m5381197987199.ps tmp/2m5381197987199.png") > > > proc.time() user system elapsed 0.869 0.312 0.960