R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(0.4754,0.4531,0.469,0.4716,0.4824,0.527,0.5172,0.515,0.5245,0.53,0.4836,0.4663,0.4592,0.4553,0.4217,0.4366,0.4532,0.4743,0.4776,0.4949,0.5069,0.498,0.5213,0.5394,0.6075,0.5919,0.5758,0.5916,0.6474,0.6704,0.7553,0.7891,0.784,0.7007,0.668,0.6102,0.5238,0.4237,0.3983,0.3879,0.3733,0.394,0.3945,0.4324,0.4233,0.455,0.4344,0.4388,0.4561,0.4512,0.4756,0.4704,0.5107,0.5472,0.5537,0.5539,0.5313,0.5371,0.5459,0.5461) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > 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/html/rcomp/tmp/1azdf1291479079.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/html/rcomp/tmp/2azdf1291479079.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.4935083203 0.4766864905 0.2625649157 0.3125891684 [6] -0.0042908744 -0.0130600894 -0.0742865365 -0.1935179378 -0.2842169265 [11] -0.3736235128 -0.3221604817 -0.5463882192 -0.3593334096 -0.3521273165 [16] -0.1007360862 -0.2386216035 -0.0264695674 -0.0427399520 0.1435928280 [21] 0.0596325488 0.1536577862 0.1471538402 0.1407586354 0.0653651417 [26] 0.0917626586 0.1255750665 0.0171854715 0.0731242535 0.0056382427 [31] 0.0622883710 -0.0763321201 -0.0107041455 -0.0607627882 -0.0144724949 [36] -0.0401385697 0.0020285570 -0.0041410461 -0.0156996647 0.0047775600 [41] 0.0038770001 0.0088007561 0.0014852056 0.0113694485 -0.0147846600 [46] 0.0060186302 -0.0008328942 > (mypacf <- c(rpacf$acf)) [1] 0.493508320 0.308197727 -0.076364350 0.139746296 -0.307891368 [6] -0.080281819 0.071975355 -0.257882668 -0.062153257 -0.197577635 [11] -0.051723935 -0.322818759 0.070657570 0.039439820 0.141023430 [16] -0.111455899 -0.075519100 -0.037676533 0.099050557 -0.077428888 [21] -0.111126119 -0.098885267 -0.099568544 -0.239133757 0.066918045 [26] 0.025384842 0.027824010 0.020501266 -0.092012869 -0.028310865 [31] 0.062194527 -0.088751554 -0.017786610 -0.130001949 0.019170390 [36] -0.168207518 0.011287539 -0.015823971 0.054152150 0.001841690 [41] -0.091585126 0.033865363 -0.018551178 -0.059312849 -0.026686802 [46] -0.041825841 > 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/3164z1291479079.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/44p251291479079.tab") > > try(system("convert tmp/1azdf1291479079.ps tmp/1azdf1291479079.png",intern=TRUE)) character(0) > try(system("convert tmp/2azdf1291479079.ps tmp/2azdf1291479079.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.590 0.328 1.367