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(544.5,619.8,777.6,640.4,633.0,722.0,860.1,495.1,692.8,766.7,648.5,640.0,681.6,752.5,1031.7,685.5,887.6,655.4,944.2,626.6,1221.8,939.6,886.6,811.3,774.7,910.6,911.6,697.7,829.8,824.3,885.6,538.9,686.0,878.7,812.7,640.4,773.9,795.9,836.3,876.1,851.7,692.4,877.3,536.8,705.9,951.0,755.7,695.5,744.8,672.1,666.6,760.8,756.0,604.4,883.9,527.9,756.2,812.9,655.6,707.6) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '0.0' > 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/1gzdu1196437063.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/241421196437063.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.0455442148 0.1038774748 0.1249301045 0.2518350035 [6] 0.0266673903 0.1572146028 0.0629037695 0.1493254461 -0.0183971172 [11] -0.0596580643 -0.1849117498 0.3413622803 -0.2858470936 -0.0901991750 [16] -0.0791329695 0.0243062283 -0.1264089115 -0.0848218697 -0.0236659957 [21] -0.0071491232 -0.1546246876 -0.0938668438 -0.1683818735 0.2129786130 [26] -0.1243316985 -0.0929851035 -0.0676231450 0.0362827549 -0.2045991131 [31] -0.1319233283 0.0905200923 -0.0354699946 -0.1434834202 -0.0053346077 [36] -0.1940860262 0.1123725104 -0.1120191128 -0.0763077148 -0.0601692407 [41] 0.0667667112 -0.0737011446 0.0087501833 0.1247359001 -0.0283639263 [46] -0.0123321845 0.0574644587 -0.0159276803 0.1150134992 0.0133704997 [51] 0.0125428549 0.0449900739 0.0508332633 0.0006329997 0.0115897006 [56] 0.0756325521 -0.0095019952 -0.0028527886 0.0276097964 0.0091131503 > (mypacf <- c(rpacf$acf)) [1] -0.045544215 0.102014806 0.135513127 0.261676478 0.039657005 [6] 0.107942048 0.014319078 0.072299850 -0.059677737 -0.176225934 [11] -0.306517486 0.287646270 -0.237048946 -0.098290494 -0.041883565 [16] 0.010314033 0.109738209 -0.051794446 0.093708610 0.004462834 [21] -0.102164505 -0.051049738 -0.144400589 0.056279838 0.107221371 [26] -0.112465491 -0.043833628 -0.033737060 -0.194883635 -0.100179482 [31] 0.052561187 -0.029750275 -0.012452201 0.049625845 -0.118826586 [36] 0.014859334 -0.033607646 -0.012927630 -0.070629381 -0.061833094 [41] 0.100454823 0.072804057 -0.011457153 -0.070353319 0.006577592 [46] -0.041567142 0.069741813 -0.139560325 -0.038292661 -0.078728010 [51] -0.024790503 -0.018212803 0.016772192 0.093405310 -0.023627305 [56] -0.020979781 -0.029516494 -0.045943658 -0.036461666 > 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/3lp5p1196437063.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/47i7u1196437063.tab") > > system("convert tmp/1gzdu1196437063.ps tmp/1gzdu1196437063.png") > system("convert tmp/241421196437063.ps tmp/241421196437063.png") > > > proc.time() user system elapsed 0.962 0.336 1.164