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 = '0' > 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/1i9z31197627596.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/2n92n1197627596.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.793526419 0.622930052 0.523429179 0.496118288 [6] 0.436164304 0.430052134 0.336176978 0.217868706 0.149029580 [11] 0.198871571 0.211594290 0.263828413 0.223356974 0.142684620 [16] 0.069811180 0.093424527 0.145575684 0.168453859 0.147819150 [21] 0.101267996 0.011183002 0.009059916 0.039765575 0.051974932 [26] 0.001647951 -0.042172191 -0.122044786 -0.176503676 -0.154857839 [31] -0.120025086 -0.155427804 -0.174627949 -0.210804823 -0.218389675 [36] -0.191238669 -0.107280833 -0.102979032 -0.142742234 -0.179013222 [41] -0.190341651 -0.207642955 -0.186277632 -0.175385768 -0.208416062 [46] -0.274935964 -0.269504369 -0.248376023 -0.232204350 -0.211009890 [51] -0.238637969 -0.286413920 -0.303216120 -0.277390139 -0.249712067 [56] -0.194480744 -0.166255546 -0.171641136 -0.141900736 -0.053764423 > (mypacf <- c(rpacf$acf)) [1] 0.7935264191 -0.0182388246 0.0933974672 0.1541129445 -0.0548630957 [6] 0.1643927335 -0.2114564674 -0.1219733658 0.0423078567 0.1853155276 [11] 0.0034749609 0.1987578548 -0.1542739837 -0.1161979692 -0.0218087909 [16] 0.0002755220 0.1564146771 -0.0057955088 0.0335709734 -0.0345711986 [21] -0.1655311582 0.0176607647 -0.0126493907 -0.0384059163 0.0009959946 [26] 0.0264608497 -0.1400202809 -0.0718444079 -0.0095084892 -0.0422215209 [31] -0.0005625085 0.0626825100 -0.0353068095 0.0139791187 -0.0087190154 [36] 0.0386408820 -0.0580528616 -0.0505695601 -0.0085509179 -0.0162174894 [41] -0.0633702245 -0.0407163960 0.0258523426 -0.0639055381 -0.0361288901 [46] 0.0403475257 0.0024174117 -0.0654117968 0.0050086979 -0.1300844662 [51] 0.0159006161 -0.0386336442 -0.0191234208 0.0427422356 0.1061575585 [56] -0.0431672440 0.0495121774 0.0796281285 0.0398464407 > 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/3zypn1197627596.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/448ba1197627596.tab") > > system("convert tmp/1i9z31197627596.ps tmp/1i9z31197627596.png") > system("convert tmp/2n92n1197627596.ps tmp/2n92n1197627596.png") > > > proc.time() user system elapsed 0.859 0.299 0.973