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(16198.9,16554.2,19554.2,15903.8,18003.8,18329.6,16260.7,14851.9,18174.1,18406.6,18466.5,16016.5,17428.5,17167.2,19630.00,17183.6,18344.7,19301.4,18147.5,16192.9,18374.4,20515.2,18957.2,16471.5,18746.8,19009.5,19211.2,20547.7,19325.8,20605.5,20056.9,16141.4,20359.8,19711.6,15638.6,14384.5,13855.6,14308.3,15290.6,14423.8,13779.7,15686.3,14733.8,12522.5,16189.4,16059.1,16007.1,15806.8,15160.00,15692.1,18908.9,16969.9,16997.5,19858.9,17681.2) > par7 = '0.95' > par6 = 'White Noise' > par5 = '1' > par4 = '0' > 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/1q7fw1291451949.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/2q7fw1291451949.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.000000000 -0.325215336 -0.299409904 0.189482449 0.082393058 [6] -0.091794481 0.117878541 -0.224924619 0.239174187 0.053815016 [11] -0.351998047 -0.085387433 0.501671064 -0.156632725 -0.214992390 [16] 0.026093870 0.077625847 -0.007465112 -0.012190914 -0.136914605 [21] 0.220405469 -0.038795642 -0.211882184 0.053186979 0.180149374 [26] 0.022987431 -0.158241197 -0.054915255 0.188080915 -0.081119668 [31] 0.011121828 -0.031962729 0.043948491 0.029325134 -0.087247088 [36] -0.104455776 0.194946209 0.002299392 -0.123786154 0.032741947 [41] 0.051616081 -0.060667262 0.054325518 -0.030297193 -0.019723883 [46] 0.081751893 -0.045050229 -0.084279714 0.108864770 > (mypacf <- c(rpacf$acf)) [1] -0.3252153364 -0.4530966986 -0.1398202578 -0.0243642635 -0.0004072742 [6] 0.1920159273 -0.1802941176 0.2145330296 0.1136986916 -0.2162155775 [11] -0.4279991887 0.0935462627 0.1635696356 0.0277391662 -0.1049528896 [16] -0.1231942062 -0.0775583164 -0.0623897032 -0.0385413617 -0.0137357002 [21] -0.1499342368 -0.0320905125 0.1384086931 -0.0413839696 0.0471905290 [26] -0.1078894529 -0.0538413127 0.0769174781 -0.1243037963 0.0908027129 [31] -0.0850776986 -0.0818562780 -0.0046342236 0.0238206347 -0.1259837819 [36] -0.1394083673 -0.0870757162 0.0176448812 0.1670895462 0.0005691278 [41] -0.0466527361 -0.1269035071 -0.0257608823 0.0133720806 -0.0597332095 [46] -0.0545334366 0.0193346247 -0.0215190336 > 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/34zvn1291451949.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/4xqv81291451949.tab") > > try(system("convert tmp/1q7fw1291451949.ps tmp/1q7fw1291451949.png",intern=TRUE)) character(0) > try(system("convert tmp/2q7fw1291451949.ps tmp/2q7fw1291451949.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.583 0.325 1.350