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(9.026,9.787,9.536,9.490,9.736,9.694,9.647,9.753,10.070,10.137,9.984,9.732,9.103,9.155,9.308,9.394,9.948,10.177,10.002,9.728,10.002,10.063,10.018,9.960,10.236,10.893,10.756,10.940,10.997,10.827,10.166,10.186,10.457,10.368,10.244,10.511,10.812,10.738,10.171,9.721,9.897,9.828,9.924,10.371,10.846,10.413,10.709,10.662,10.570,10.297,10.635,10.872,10.296,10.383,10.431,10.574,10.653,10.805,10.872,10.625,10.407,10.463,10.556,10.646,10.702,11.353,11.346,11.451,11.964,12.574,13.031,13.812,14.544,14.931,14.886,16.005,17.064,15.168,16.050,15.839,15.137,14.954,15.648,15.305,15.579,16.348,15.928,16.171,15.937,15.713,15.594,15.683,16.438,17.032,17.696,17.745,19.394,20.148,20.108,18.584,18.441,18.391,19.178,18.079,18.483,19.644,19.195,19.650,20.830,23.595,22.937,21.814,21.928,21.777,21.383,21.467,22.052,22.680,24.320,24.977,25.204,25.739,26.434,27.525,30.695,32.436,30.160,30.236,31.293,31.077,32.226) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #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 (par8 != '') par8 <- as.numeric(par8) > ox <- x > if (par8 == '') { + if (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } + } else { + x <- log(x,base=par8) + } > 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/1421b1292955046.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,1)) > plot(ox,type='l',main='Original Time Series',xlab='time',ylab='value') > if (par8=='') { + mytitle <- paste('Working Time Series (lambda=',par2,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } else { + mytitle <- paste('Working Time Series (base=',par8,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(base=',par8,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } > plot(x,type='l', main=mytitle,xlab='time',ylab='value') > par(op) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2fbie1292955046.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=mysub) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/383zh1292955046.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',sub=mysub) > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.000000000 0.117448991 -0.161636444 0.080327515 0.074290567 [6] -0.079815944 0.006419325 0.084176202 -0.043173000 0.041252176 [11] -0.062054332 0.065096845 0.107107880 0.032455792 -0.051004287 [16] 0.151989136 0.139774941 -0.119604420 -0.084392319 -0.040726439 [21] 0.058761406 -0.015776498 0.094009701 0.079426514 -0.027966132 [26] -0.043463604 0.061686991 0.115909025 0.047801596 -0.011876941 [31] -0.051568690 0.023718628 -0.032337300 0.040371945 0.047840939 [36] -0.076884001 0.006848111 0.019102816 -0.022181037 0.001150977 [41] 0.065135303 -0.079426609 -0.038193066 0.047769963 -0.087835807 [46] -0.056069632 0.056060877 0.001168142 -0.019846389 0.147654832 [51] 0.030955512 -0.012040937 0.085543666 0.012489805 0.050156852 [56] -0.002407499 -0.018765200 -0.065915375 -0.002824927 0.018353636 [61] -0.012421389 > (mypacf <- c(rpacf$acf)) [1] 0.117448991 -0.177884496 0.129404146 0.015425098 -0.061215685 [6] 0.037391498 0.045211726 -0.047806672 0.087732634 -0.127061897 [11] 0.133474777 0.050965198 0.037714001 -0.034970384 0.165327931 [16] 0.061220200 -0.069510587 -0.077866831 -0.084787528 0.078026949 [21] -0.013189139 0.107764938 0.037966441 -0.039742259 -0.012427686 [26] 0.059194643 0.041098938 0.065680693 -0.034350290 -0.020474370 [31] -0.014547281 -0.027510206 0.097574139 0.025527494 -0.128138796 [36] 0.040674735 -0.057393626 -0.046402127 0.044158489 0.040869474 [41] -0.069803179 -0.032646471 -0.031772192 -0.082115191 0.018738507 [46] 0.046646320 0.007194754 -0.003394233 0.074098966 0.030887889 [51] 0.067474067 0.076666931 -0.007455119 0.077931636 -0.086098869 [56] -0.003593224 -0.002990123 0.003209366 0.031333519 -0.031533213 > 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/4tlg51292955046.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/5fmet1292955046.tab") > > try(system("convert tmp/1421b1292955046.ps tmp/1421b1292955046.png",intern=TRUE)) character(0) > try(system("convert tmp/2fbie1292955046.ps tmp/2fbie1292955046.png",intern=TRUE)) character(0) > try(system("convert tmp/383zh1292955046.ps tmp/383zh1292955046.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.782 0.497 2.677