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(86.5,104.1,110.9,114.5,112.2,96.4,92,102,99.7,102,98.9,87.4,94.4,109.3,116.4,101,105.5,97.8,95.5,113.7,103.7,100.8,113.8,84.6,95.3,110,107.5,107.6,116,96.9,97,108.1,101.9,107.2,110.2,78.7,96.5,115.2,104.7,109.1,108.4,95.5,97.8,115.1,96.2,112,111.8,82.5,100.8,116,116.3,116.6,112.9,100.9,104.1,117.4,103.3,111.6,115,92.6,105.2) > par5 = '12' > par4 = '1' > par3 = '0' > 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/1dgc11196797026.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/2o9b61196797026.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.0771997048 -0.0355988540 0.0301874389 -0.1534094399 [6] 0.1909078101 0.1597429361 -0.2571225342 0.1890008887 0.2133344743 [11] 0.0408173503 0.0508511462 -0.2964627802 -0.1815352618 0.0454010803 [16] 0.0572591853 -0.0904506533 -0.0176879183 -0.1043558826 -0.0908463424 [21] -0.0180634131 -0.1058212294 -0.1578444279 0.1176328400 -0.0540541289 [26] 0.0000352594 0.0500393426 -0.1265443070 -0.0234518381 0.0629842757 [31] -0.0895100815 0.1270660422 0.0421376222 -0.0546106694 0.0138682899 [36] -0.1314943731 -0.0447867288 0.0629242019 -0.0143695945 -0.0046572361 [41] 0.0470251652 0.0052938846 0.0432357640 -0.0510892049 -0.0757118799 [46] -0.0126272572 0.0238534257 0.0331486485 0.0081592595 > (mypacf <- c(rpacf$acf)) [1] 0.077199705 -0.041807814 0.036559516 -0.161758483 0.228194432 [6] 0.109588817 -0.278697706 0.257354677 0.251828987 -0.024399716 [11] -0.140393932 -0.170191481 -0.052443759 -0.176781108 0.116991101 [16] -0.125571089 -0.017968091 -0.068796303 -0.181376342 0.012213849 [21] 0.063178540 -0.015275322 0.097124286 -0.085079384 0.007948907 [26] -0.028967158 0.068406638 -0.043203864 0.024204172 -0.008732211 [31] 0.010317389 -0.060549384 -0.008777859 -0.112484941 -0.136002536 [36] -0.029355841 0.002308449 -0.046541406 -0.026543509 0.012542407 [41] 0.050439681 0.004683981 0.031678344 0.025798678 0.065979314 [46] -0.115729035 -0.020888313 -0.011231131 > 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/32fax1196797026.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/4w1wf1196797026.tab") > > system("convert tmp/1dgc11196797026.ps tmp/1dgc11196797026.png") > system("convert tmp/2o9b61196797026.ps tmp/2o9b61196797026.png") > > > proc.time() user system elapsed 0.870 0.328 0.981