R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(13807.9,14101.7,16010.3,14633.1,14478.5,15327.3,14179.5,11398.2,16111.5,15887.4,14529.3,13923.1,13960.2,14807.8,17511.5,15845.9,14594.2,17252.2,14832.8,13132.1,17665.9,16913,17318.8,16224.2,15469.6,16557.5,19414.8,17335,16525.2,18160.4,15553.8,15262.2,18581,17564.1,18948.6,17187.8,17564.8,17668.4,20811.7,17257.8,18984.2,20532.6,17082.3,16894.9,20274.9,20078.6,19900.9,17012.2,19642.9,19024,21691,18835.9,19873.4,21468.2,19406.8,18385.3,20739.3,22268.3,21569,17514.8) > 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/1v4ya1229016145.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/2nm631229016145.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.097429362 -0.167497138 0.263235642 0.046526466 [6] -0.010402283 -0.028846960 -0.257074019 -0.069918178 0.155249392 [11] -0.232097468 -0.260831694 0.020326265 -0.020081665 0.188114937 [16] -0.151526515 -0.154446992 0.286301077 0.068093861 -0.035178119 [21] 0.081426388 0.104610870 -0.042221595 0.179879993 -0.174290679 [26] -0.204292019 0.183106663 -0.028550675 -0.162231644 -0.020508933 [31] -0.093799654 0.082730528 0.014037877 -0.139035097 0.078927097 [36] 0.137548890 -0.086099822 -0.002657601 0.027527036 -0.059286264 [41] 0.086299601 -0.007056590 -0.097652850 0.068001597 0.031340688 [46] -0.054478231 0.009493943 0.044713237 > (mypacf <- c(rpacf$acf)) [1] -0.0974293617 -0.1786857896 0.2363077670 0.0698970502 0.0866789777 [6] -0.0756205166 -0.3208105520 -0.2046258612 0.0877055978 -0.0772577172 [11] -0.1868606689 -0.1629372187 -0.1067200092 0.2983198361 -0.0618961924 [16] -0.1488113772 -0.0246277000 -0.0842884177 0.1175282788 0.1176419222 [21] 0.1232049432 -0.2291518261 -0.0309998081 -0.1201015958 -0.0217698322 [26] 0.0147395690 0.0306889058 -0.0372781500 -0.0223703893 -0.0882059481 [31] 0.0661385576 0.0082060064 -0.0962335326 0.0421730197 -0.0587260091 [36] -0.0610481922 -0.1142516750 -0.0107954658 -0.0008071217 -0.1546074698 [41] -0.0653352120 0.0200508815 0.0605432675 0.0205756065 0.0253443319 [46] -0.1044623517 0.0083382621 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > 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 2:(par1+1)) { + 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(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/36f961229016145.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,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(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/43p0p1229016145.tab") > > system("convert tmp/1v4ya1229016145.ps tmp/1v4ya1229016145.png") > system("convert tmp/2nm631229016145.ps tmp/2nm631229016145.png") > > > proc.time() user system elapsed 0.581 0.339 1.446