R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(1.579,2.146,2.462,3.695,4.831,5.134,6.250,5.760,6.249,2.917,1.741,2.359,1.511,2.059,2.635,2.867,4.403,5.720,4.502,5.749,5.627,2.846,1.762,2.429,1.169,2.154,2.249,2.687,4.359,5.382,4.459,6.398,4.596,3.024,1.887,2.070,1.351,2.218,2.461,3.028,4.784,4.975,4.607,6.249,4.809,3.157,1.910,2.228,1.594,2.467,2.222,3.607,4.685,4.962,5.770,5.480,5.000,3.228,1.993,2.288,1.580,2.111,2.192,3.601,4.665,4.876,5.813,5.589,5.331,3.075,2.002,2.306,1.507,1.992,2.487,3.490,4.647,5.594,5.611,5.788,6.204,3.013,1.931,2.549,1.504,2.090,2.702,2.939,4.500,6.208,6.415,5.657,5.964,3.163,1.997,2.422,1.376,2.202,2.683,3.303,5.202,5.231,4.880,7.998,4.977,3.531,2.025,2.205,1.442,2.238,2.179,3.218,5.139,4.990,4.914,6.084,5.672,3.548,1.793,2.086) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/rcomp/tmp/1sdfw1291979961.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/2k4ez1291979961.ps",horizontal=F,onefile=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.3369192553 -0.0213084547 0.2196734686 -0.0559260940 [6] 0.0684355864 0.1299509955 -0.1183691442 0.0426551033 0.1381797556 [11] -0.0165089331 0.0835924585 -0.2134005588 0.1190861161 0.2175120586 [16] -0.1207580635 -0.0832297642 0.1205860652 -0.0495200455 -0.0639650805 [21] 0.0872547228 -0.0822083588 -0.1536868612 0.2420705059 -0.1177892033 [26] -0.1474769912 0.1403648601 -0.0645213936 -0.0000187347 0.0329571650 [31] -0.0827748270 -0.0012766930 0.0630261972 -0.0835801476 -0.0498167786 [36] 0.0044647317 -0.0942418022 0.1380584502 -0.1148468195 -0.0249907534 [41] 0.0655375099 0.0135565166 -0.0413278298 0.0556285769 -0.0200260237 [46] -0.0391329037 0.1215563534 -0.0270174262 -0.1901564749 > (mypacf <- c(rpacf$acf)) [1] -0.336919255 -0.152087149 0.184947895 0.100154235 0.122698079 [6] 0.177935817 -0.022325011 -0.049764452 0.078319506 0.095438309 [11] 0.133412563 -0.245834932 -0.081205799 0.224445659 0.136138419 [16] -0.141195111 -0.073178499 0.013927434 -0.154714361 -0.086164479 [21] 0.088618428 -0.143346409 0.034466591 -0.058937905 -0.083085072 [26] 0.143650083 0.042569693 -0.060724907 0.007051512 0.060606067 [31] -0.057117075 0.020347962 0.077145979 -0.203158891 -0.039343622 [36] -0.039254447 0.021755999 0.027659841 0.078901603 -0.046735306 [41] 0.041933005 0.088767589 -0.008184018 0.039263171 0.057098286 [46] -0.102629068 0.062661532 -0.142764628 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/365v51291979961.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/rcomp/tmp/4r5ts1291979961.tab") > > try(system("convert tmp/1sdfw1291979961.ps tmp/1sdfw1291979961.png",intern=TRUE)) character(0) > try(system("convert tmp/2k4ez1291979961.ps tmp/2k4ez1291979961.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.660 0.260 0.896