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.7,100.6,101.2,93.1,84.2,85.8,91.8,92.4,80.3,79.7,62.5,57.1,100.8,100.7,86.2,83.2,71.7,77.5,89.8,80.3,78.7,93.8,57.6,60.6,91,85.3,77.4,77.3,68.3,69.9,81.7,75.1,69.9,84,54.3,60,89.9,77,85.3,77.6,69.2,75.5,85.7,72.2,79.9,85.3,52.2,61.2,82.4,85.4,78.2,70.2,70.2,69.3,77.5,66.1,69,75.3,58.2,59.7) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '36' > #'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/1lhz81196423209.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/2cpri1196423209.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.186635490 0.187461889 0.261171658 -0.078519065 [6] 0.076068425 0.030645655 -0.092894915 0.054124227 -0.057898741 [11] -0.040793681 0.003561051 -0.234953340 -0.092872809 -0.004765937 [16] -0.075080422 -0.145552865 0.051185472 0.054785933 -0.101051087 [21] 0.021638889 0.055452046 -0.086575365 0.085541625 -0.037562137 [26] -0.125058693 0.001900895 -0.143292140 -0.028302313 -0.022308950 [31] -0.164698130 0.080168410 -0.018640322 -0.189932783 -0.054646566 [36] -0.079629533 -0.011376384 > (mypacf <- c(rpacf$acf)) [1] 0.1866354897 0.1581374539 0.2148742773 -0.1939645010 0.0482374124 [6] -0.0040445655 -0.0535728085 0.0333600674 -0.0452333507 0.0004598174 [11] -0.0217047793 -0.2122962508 -0.0305782314 0.0901526931 0.0496396711 [16] -0.2315329851 0.1269410039 0.1473417769 -0.1678010442 -0.0690276859 [21] 0.1578399237 -0.0521720651 -0.0064712744 -0.1087333629 -0.1023154931 [26] 0.0383064544 -0.0573027123 -0.1028287976 0.0293072709 0.0373672910 [31] 0.0023687724 -0.1241451024 -0.0733869440 -0.0718279175 0.0096896949 [36] 0.0899753317 > 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/3s4ii1196423210.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/4lx8d1196423210.tab") > > system("convert tmp/1lhz81196423209.ps tmp/1lhz81196423209.png") > system("convert tmp/2cpri1196423209.ps tmp/2cpri1196423209.png") > > > proc.time() user system elapsed 0.839 0.332 1.151