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(87,75,74,91,101,103,106,102,105,105,100,95,96,98,99,92,84,81,72,89,96,91,88,90,98,87,100,100,104,107,105,102,98,106,97,101,100,93,94,96,96,98,102,95,85,84,82,87,77,90,90,94,97,96,93,93,93,97,100,95,97,103,102,93,99,100,97,104,102,103,100,90,90) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > 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/12njr1196468118.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/2g2y11196468118.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.102261333 -0.091380563 -0.060962368 -0.077001192 [6] -0.020645646 -0.050696779 0.124893846 -0.177453433 0.139043004 [11] -0.043132997 -0.050960884 -0.097633409 -0.157612255 0.043439948 [16] -0.014819973 0.241851732 -0.101120499 -0.108626088 -0.027008482 [21] 0.048592886 0.019462606 -0.053085880 0.205151276 -0.155869669 [26] 0.015085997 0.035620373 0.034115674 0.012797295 0.024844478 [31] 0.054172998 -0.059261348 0.045316185 -0.010549519 -0.012130955 [36] -0.037102051 0.008448824 0.033372597 0.096435021 -0.053587872 [41] -0.166914785 0.036009817 -0.047220560 0.030360642 -0.038995554 [46] 0.004514097 0.055682173 0.037909076 0.029850975 > (mypacf <- c(rpacf$acf)) [1] -0.1022613329 -0.1029141555 -0.0835421065 -0.1061576077 -0.0602513215 [6] -0.0902582491 0.0868864330 -0.1913829520 0.1119689793 -0.0664385658 [11] -0.0454077412 -0.1489380348 -0.2019504340 -0.0904590227 -0.0719751873 [16] 0.1204307170 -0.0919395171 -0.1703134062 -0.1060389448 -0.0022746711 [21] -0.0758800966 -0.0809705683 0.0831796003 -0.1576202565 -0.1275642356 [26] -0.0737637066 0.0147842971 0.0165676504 0.0524036554 -0.0547788426 [31] -0.0350147745 -0.0918076528 0.0694711501 0.0455553181 -0.0172977338 [36] -0.0223103834 -0.0114598883 0.1717649818 -0.0573861457 -0.0531863482 [41] 0.1023322924 -0.0568559452 -0.0368376632 -0.0617030526 -0.0003593018 [46] 0.0804559667 0.1077510002 0.0337968205 > 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/3lan61196468118.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/4j4uu1196468118.tab") > > system("convert tmp/12njr1196468118.ps tmp/12njr1196468118.png") > system("convert tmp/2g2y11196468118.ps tmp/2g2y11196468118.png") > > > proc.time() user system elapsed 0.883 0.331 0.977