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(153.4,159.5,157.4,169.1,172.6,161.7,159.2,157.4,153.9,144.8,142.2,140.1,143.4,153.3,166.9,170.6,182.8,170.3,156.6,155.2,154.7,151.6,152.1,153.2,149.5,149.7,144.3,140,137.8,132.2,128.9,123.1,120.4,122.8,126,124.5,120.6,114.7,111.7,109.1,108,107.7,99.9,103.7,103.4,103.4,104.7,105.8,105.3,103,103.8,103.4,105.8,101.4,97,94.3,96.6,97.1,95.7,96.9,97.4,95.3,93.6,91.5,93.1,91.7,94.3,93.9,90.9,88.3,91.3,91.7,92.4,92,95.6,95.8,96.4,99,107,109.7,116.2,115.9,113.8,112.6,113.7,115.9,110.3,111.3,113.4,108.2,104.8,106,110.9,115,118.4,121.4,128.8,131.7,141.7,142.9,139.4,134.7,125,113.6,111.5,108.5,112.3,116.6,115.5,120.1,132.9,128.1,129.3,132.5,131,124.9,120.8,122,122.1,127.4,135.2,137.3,135,136,138.4,134.7,138.4,133.9,133.6,141.2,151.8,155.4,156.6,161.6,160.7,156,159.5,168.7,169.9,169.9,185.9) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '0.0' > 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/1cm0c1196424720.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/2dhnm1196424720.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.170601884 -0.003255701 0.176389741 -0.025388413 [6] -0.159626280 -0.100354661 -0.035597238 -0.125282369 -0.130846257 [11] -0.040994112 -0.014179076 -0.346561817 0.126045956 0.185450304 [16] -0.119006725 0.061926241 0.080179099 0.080345107 0.083296286 [21] 0.032695720 0.048350193 0.055450823 -0.126043656 -0.150550453 [26] -0.151516835 -0.105706375 0.077203584 -0.032673509 0.001246429 [31] -0.019894896 0.046200280 0.110555791 0.025504409 -0.055756950 [36] 0.074588155 0.085120910 > (mypacf <- c(rpacf$acf)) [1] 0.1706018836 -0.0333307964 0.1883345975 -0.0961474252 -0.1344393869 [6] -0.0916581722 0.0081946814 -0.0807150222 -0.0832819140 -0.0402593189 [11] 0.0014524609 -0.3703875963 0.2792558583 0.0360841343 -0.0807378700 [16] -0.0107264315 -0.0785401303 0.1368453038 0.0955435651 -0.0875870291 [21] 0.0327732803 0.0358220831 -0.1179738956 -0.2810689903 0.0711485697 [26] 0.0916156655 0.0359748499 -0.0555606304 -0.0599431386 -0.0476528375 [31] 0.1681401217 -0.0396968966 0.0003901616 -0.0751044223 -0.0253968054 [36] -0.0583659100 > 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/38bc71196424720.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/4iyal1196424720.tab") > > system("convert tmp/1cm0c1196424720.ps tmp/1cm0c1196424720.png") > system("convert tmp/2dhnm1196424720.ps tmp/2dhnm1196424720.png") > > > proc.time() user system elapsed 0.821 0.328 0.955