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(106.22,106.31,107.38,109.31,110.82,111.22,110.66,110.76,110.69,111.08,110.97,110.24,112.51,111.52,112.13,112.23,112.92,111.89,111.99,111.51,112.33,112.04,112.09,111.41,112.61,113.14,113.65,114.26,114.4,114.93,114.86,114.95,116.17,114.6,114.62,113.82,115.02,115.18,115.59,116.6,117.07,116.96,116.66,116.07,116.04,115.81,116.22,115.85,116.43,117.39,119.17,119.24,120.03,119.34,118.49,118.59,117.5,117.56,118.25,118.01) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1.2' > 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/1eqqq1197034130.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/2n4dy1197034130.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.0664795051 0.2090238040 -0.1727707710 -0.0358767360 [6] -0.1872850429 -0.1451526927 -0.1905335450 0.0722639106 -0.0485717557 [11] 0.1517771340 -0.0166131208 0.2954598612 -0.0293588888 0.0189947846 [16] -0.1807628817 0.0095463956 -0.1659026490 -0.0116394256 -0.1741966035 [21] 0.1537539343 -0.0560375741 0.1345836108 0.0258062081 0.1619410058 [26] 0.0254292085 0.0718570082 -0.0288462055 0.0251805443 -0.1103278708 [31] -0.0844970270 -0.1673471993 -0.0237666489 -0.0497123184 0.1267162267 [36] -0.0007583335 0.1297842618 0.0668522358 0.0625456372 -0.1075209472 [41] -0.0264577567 -0.0783874275 -0.0770942646 0.0299866352 -0.1007566876 [46] 0.0497656943 0.1665131420 0.0737408464 0.0886692168 > (mypacf <- c(rpacf$acf)) [1] -0.066479505 0.205512547 -0.155284146 -0.097851101 -0.135384535 [6] -0.173561964 -0.189859784 0.055951313 -0.055021452 0.022076537 [11] -0.047362547 0.206518100 -0.006139979 -0.093522730 -0.100867865 [16] 0.043898261 -0.071300289 -0.028237615 -0.108435928 0.049805859 [21] -0.069764947 -0.029689794 0.058499220 0.045575556 0.031092306 [26] 0.079112254 0.131509871 0.027109120 -0.008498787 -0.066964648 [31] -0.056985553 -0.103106159 -0.032547651 0.068298404 -0.042169650 [36] -0.059164149 0.077045024 0.022679022 -0.114736907 -0.020149925 [41] 0.103602960 -0.033602039 0.119656368 -0.085495482 -0.037160196 [46] 0.126389240 0.041646290 -0.019472267 > 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/3rnfp1197034130.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/4skae1197034130.tab") > > system("convert tmp/1eqqq1197034130.ps tmp/1eqqq1197034130.png") > system("convert tmp/2n4dy1197034130.ps tmp/2n4dy1197034130.png") > > > proc.time() user system elapsed 0.894 0.335 1.024