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(263418000000,262752000000,266433000000,267722000000,266003000000,262971000000,265521000000,264676000000,270223000000,269508000000,268457000000,265814000000,266680000000,263018000000,269285000000,269829000000,270911000000,266844000000,271244000000,269907000000,271296000000,270157000000,271322000000,267179000000,264101000000,265518000000,269419000000,268714000000,272482000000,268351000000,268175000000,270674000000,272764000000,272599000000,270333000000,270846000000,270491000000,269160000000,274027000000,273784000000,276663000000,274525000000,271344000000,271115000000,270798000000,273911000000,273985000000,271917000000,273338000000,270601000000,273547000000,275363000000,281229000000,277793000000,279913000000,282500000000,280041000000,282166000000,290304000000,283519000000) > par5 = '12' > par4 = '1' > par3 = '1' > 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/1jsc71197627808.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/2v0oa1197627808.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.00000000 -0.31590013 -0.23049057 0.24658192 0.11359034 -0.33473586 [7] 0.17767031 0.12034770 -0.21099225 -0.06173951 0.26382572 -0.19172567 [13] -0.19036420 0.23726342 -0.04171171 -0.15176889 -0.02920096 0.20555260 [19] -0.16464634 0.12020403 0.09932760 -0.10375333 -0.02007765 0.22889971 [25] -0.12751256 -0.08461634 0.03494178 0.15802472 -0.31698007 0.14817439 [31] 0.12449928 -0.15373657 -0.03842617 0.13399703 -0.17919668 -0.04233011 [37] 0.12410265 -0.01306955 -0.05531291 0.01645582 0.06649370 -0.07200484 [43] 0.03462896 -0.03922054 0.06857229 -0.09278573 0.03914518 > (mypacf <- c(rpacf$acf)) [1] -0.315900130 -0.366897199 0.039989012 0.190919350 -0.171929571 [6] 0.043482744 0.051764184 -0.064116499 -0.119779598 0.070088893 [11] -0.067604870 -0.195040813 -0.021308992 -0.067707934 0.013601494 [16] -0.217826329 0.024192592 -0.009032699 0.196092263 0.110861514 [21] -0.025214046 0.067495400 0.114508316 0.018113547 -0.063497065 [26] -0.152493058 0.082666931 -0.254381603 0.028560367 0.063120396 [31] 0.114405723 0.032007467 -0.035498784 -0.067145370 0.010572868 [36] -0.067907866 -0.113098086 0.092596714 -0.065107222 -0.121966721 [41] -0.025440662 -0.057364724 -0.034368764 -0.029797754 -0.009670927 [46] -0.023667425 > 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/3wn761197627808.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/4200o1197627808.tab") > > system("convert tmp/1jsc71197627808.ps tmp/1jsc71197627808.png") > system("convert tmp/2v0oa1197627808.ps tmp/2v0oa1197627808.png") > > > proc.time() user system elapsed 0.873 0.339 0.982