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(105.3,102.5,101.8,94.7,104.6,100.7,97.6,91.3,89.5,106.1,115.2,107.1,96.3,87.0,96.8,99.8,94.1,90.8,87.1,90.6,90.1,83.9,70.6,68.4,66.0,66.3,75.0,90.5,91.0,88.5,95.1,97.2,92.1,90.0,96.4,90.8,90.6,114.2,111.5,113.4,103.8,99.3,103.4,96.9,83.3,96.3,95.0,88.6,87.6,85.0,78.2,80.7,71.8,66.6,58.5,57.4,56.1,46.9,38.4,40.3) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > 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/1sstl1196245227.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/2tvml1196245227.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.070341803 -0.219686416 -0.040460189 0.015990819 [6] 0.095819140 0.061600768 -0.153038580 0.033885742 0.008074395 [11] 0.166598601 0.166700446 -0.048312338 -0.192622599 -0.046050444 [16] -0.131324492 -0.085143481 0.009037827 0.104064499 0.014630306 [21] -0.106611107 -0.082153663 0.106104606 0.003249897 -0.129916004 [26] -0.059662850 -0.102327783 0.010329409 0.148475968 -0.042507241 [31] -0.059499869 -0.045144116 0.025243662 0.083500439 -0.118033295 [36] 0.023924930 0.100970420 0.034112661 -0.046045890 -0.029747881 [41] -0.042075443 0.114039420 0.005196393 -0.082283518 -0.041693871 [46] 0.025964181 0.027895528 0.023846539 -0.100900736 -0.019232803 [51] 0.012284894 0.033496251 0.007471582 -0.019249621 -0.012965930 [56] 0.023384128 -0.002267799 0.004323133 -0.001600428 > (mypacf <- c(rpacf$acf)) [1] 0.070341803 -0.225751397 -0.005971069 -0.031384478 0.091741585 [6] 0.045533692 -0.130125670 0.091580206 -0.068658152 0.210548149 [11] 0.120720957 0.024976268 -0.131715074 -0.062865243 -0.223383319 [16] -0.166392401 -0.021720543 0.116139733 0.038848164 -0.107487948 [21] -0.088544209 0.011193036 0.008359510 -0.029785011 0.096716440 [26] -0.088372594 -0.004990573 -0.025559299 -0.132433432 -0.031668149 [31] -0.028903297 0.070052780 0.013957207 -0.105128103 0.115241582 [36] 0.005629875 0.094941274 -0.057363685 -0.027626671 -0.111117557 [41] 0.052743473 -0.027824195 -0.069006766 -0.026085295 -0.050414712 [46] -0.074155560 -0.097126119 0.006339180 0.051544916 0.024772415 [51] 0.042395701 0.030356376 -0.063096743 0.010874370 -0.058581878 [56] 0.051425646 0.025468947 -0.003832024 > 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/3w69s1196245227.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/48plh1196245227.tab") > > system("convert tmp/1sstl1196245227.ps tmp/1sstl1196245227.png") > system("convert tmp/2tvml1196245227.ps tmp/2tvml1196245227.png") > > > proc.time() user system elapsed 0.910 0.344 1.144