R version 2.7.0 (2008-04-22) Copyright (C) 2008 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(13139.7,14532.2,15167,16071.1,14827.5,15082,14772.7,16083,14272.5,15223.3,14897.3,13062.6,12603.8,13629.8,14421.1,13978.3,12927.9,13429.9,13470.1,14785.8,14292,14308.8,14013,13240.9,12153.4,14289.7,15669.2,14169.5,14569.8,14469.1,14264.9,15320.9,14433.5,13691.5,14194.1,13519.2,11857.9,14616,15643.4,14077.2,14887.5,14159.9,14643,17192.5,15386.1,14287.1,17526.6,14497,14398.3,16629.6,16670.7,16614.8,16869.2,15663.9,16359.9,18447.7,16889,16505,18320.9,15052.1,15699.8,18135.3,16768.7,18883,19021,18101.9,17776.1,21489.9,17065.3,18690,18953.1,16398.9,16895.7,18553,19270,19422.1,17579.4,18637.3,18076.7,20438.6,18075.2,19563,19899.2,19227.5,17789.6,19220.8,21968.9,21131.5,19484.6,22404.1,21099,22486.5,23707.5,21897.5,23326.4,23765.4,20444) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '2' > par3 = '1' > par2 = '-0.6' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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/19jyz1229865833.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/2lryr1229865833.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.4771622467 0.0589821272 0.1961590198 -0.1866865069 [6] 0.0148398289 0.0801905315 -0.2331290753 0.1414163847 0.0536399587 [11] -0.1453005411 0.1149458016 -0.2296269586 -0.0117521044 0.0590451245 [16] -0.0085974024 -0.1405465232 0.1199512823 0.1987349822 -0.1253922772 [21] -0.0022132144 0.1862208049 -0.2355851435 0.2659552572 -0.1347029161 [26] -0.0927818710 0.2127467566 -0.1376053260 0.0121248737 0.0821475543 [31] -0.2079701807 0.0567339339 0.0798403759 -0.2115320058 0.0079276701 [36] 0.1264247062 -0.0918950924 0.1279559802 -0.0504410238 0.0240479707 [41] 0.0248810812 0.0225379834 -0.0799419598 0.0340261533 0.0837646376 [46] -0.0965473635 0.1727405262 -0.1122508899 -0.0558499925 0.0708843518 [51] -0.0826496182 -0.0681651592 0.0503864921 -0.0078917421 -0.0001705243 [56] 0.0661886700 -0.0704623397 0.0201948263 0.0094829534 -0.0328167169 [61] 0.0336306915 > (mypacf <- c(rpacf$acf)) [1] -0.4771622467 -0.2184360299 0.1716209427 0.0124610567 -0.0962453929 [6] -0.0095271077 -0.2077596586 -0.0708496064 0.1138036651 0.0168925745 [11] -0.0204372626 -0.3530166003 -0.3671294161 -0.2210275997 0.1512760328 [16] -0.0177669555 -0.2450044360 0.1346127729 0.1500267361 -0.1216305130 [21] 0.1545486394 -0.0095716066 0.1560648537 -0.1157419569 -0.2318195538 [26] 0.0007484375 0.0115738898 0.0184173301 -0.0292106261 0.0909636713 [31] 0.0430507217 -0.1713323447 -0.0060079751 -0.1061869880 0.1107433705 [36] -0.0919173657 0.0073976622 0.0709622185 -0.0202756982 -0.0833962171 [41] -0.1076543824 0.0421952927 0.0591161493 -0.0828013370 -0.0496100631 [46] 0.0149944777 0.0138742320 -0.0737706296 -0.0753967373 0.0123649647 [51] 0.0583430128 -0.0639013082 -0.0327226452 -0.0223120113 0.0049857843 [56] -0.0765984368 0.0014225971 -0.0613859663 -0.0094216710 -0.0266648983 > 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/3wz181229865833.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/4ech71229865834.tab") > > system("convert tmp/19jyz1229865833.ps tmp/19jyz1229865833.png") > system("convert tmp/2lryr1229865833.ps tmp/2lryr1229865833.png") > > > proc.time() user system elapsed 1.551 0.557 1.646