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(2921.44,2981.85,3080.58,3106.22,3119.31,3061.26,3097.31,3161.69,3257.16,3277.01,3295.32,3363.99,3494.17,3667.03,3813.06,3917.96,3895.51,3801.06,3570.12,3701.61,3862.27,3970.10,4138.52,4199.75,4290.89,4443.91,4502.64,4356.98,4591.27,4696.96,4621.40,4562.84,4202.52,4296.49,4435.23,4105.18,4116.68,3844.49,3720.98,3674.40,3857.62,3801.06,3504.37,3032.60,3047.03,2962.34,2197.82,2014.45,1862.83,1905.41,1810.99,1670.07,1864.44,2052.02,2029.60,2070.83,2293.41,2443.27,2513.17,2466.92) > par7 = '' > par6 = 'MA' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/16msg1260828525.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/2bt0f1260828525.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.0000000000 0.9663098065 0.9212656534 0.8723149862 0.8106649556 [6] 0.7340473981 0.6444153904 0.5566279087 0.4674395349 0.3685489624 [11] 0.2712564349 0.1829731386 0.0887328050 -0.0008231418 -0.0832800184 [16] -0.1510821808 -0.2136833977 -0.2788211733 -0.3296686171 -0.3689642294 [21] -0.4065491061 -0.4420626666 -0.4679071261 -0.4815498963 -0.4817770592 [26] -0.4760887481 -0.4589873456 -0.4387724279 -0.4207191587 -0.3952579311 [31] -0.3659304386 -0.3340385964 -0.3013425685 -0.2762106034 -0.2453168007 [36] -0.2102739614 -0.1766513639 -0.1428606050 -0.1127676035 -0.0859689485 [41] -0.0595072818 -0.0325030408 -0.0093800623 0.0148380948 0.0352860430 [46] 0.0567393369 0.0750968158 0.0823800129 0.0843792975 0.0820448872 [51] 0.0782732554 0.0723377931 0.0640463749 0.0556646812 0.0477465994 [56] 0.0381265323 0.0294391298 0.0223907312 0.0163366368 0.0090229020 > (mypacf <- c(rpacf$acf)) [1] 0.9663098065 -0.1885262463 -0.0558708792 -0.2108684926 -0.2197266583 [6] -0.2080528179 0.0392656617 -0.0361088988 -0.1431592929 0.0116743386 [11] 0.0662604809 -0.2116778989 0.0427017001 -0.0027567600 0.1051289689 [16] -0.0668854139 -0.1129221461 0.0416490448 -0.0391798431 -0.0924996393 [21] -0.0665492819 -0.0027866590 0.0333508734 0.1388077557 0.0646043586 [26] 0.0142166296 -0.1492546597 -0.1167186449 -0.0052190991 -0.0384551511 [31] 0.0004123295 0.0625604003 -0.1739086427 0.0188460694 0.0240978217 [36] 0.0780342588 0.0148224347 -0.0113476692 -0.0762455326 -0.0427078072 [41] 0.0652035680 -0.0856562395 0.0594714069 -0.0336383479 -0.0167871265 [46] -0.0054353598 -0.1391906955 -0.0479641752 -0.0092398603 -0.0132643376 [51] 0.0078431618 0.0206070893 0.0610790412 -0.0214998801 -0.0104151559 [56] -0.0958832133 0.0189600038 0.0648872681 0.0012099910 > 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/3ta8t1260828525.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/4ufr51260828525.tab") > > try(system("convert tmp/16msg1260828525.ps tmp/16msg1260828525.png",intern=TRUE)) character(0) > try(system("convert tmp/2bt0f1260828525.ps tmp/2bt0f1260828525.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.602 0.316 0.696