R version 2.8.0 (2008-10-20) 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(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,22058.6,21230.8,19504.4,23913.1,23165.7,23574.3,25002,22603.9,23408.6) > par5 = '12' > par4 = '1' > par3 = '1' > 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/1hg1t1229966651.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/2d64q1229966651.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.000000000 -0.543785316 -0.036322808 0.368634909 -0.253165811 [6] -0.133509054 0.321601405 -0.266886737 0.014094060 0.259225183 [11] -0.264674556 0.047632923 0.126885091 -0.274390003 0.108109967 [16] 0.089540012 -0.211369494 0.135928404 0.127965627 -0.199076337 [21] 0.119632849 0.039160386 -0.229333909 0.359942896 -0.299294445 [26] 0.066440276 0.176584741 -0.156982461 -0.038227928 0.212662713 [31] -0.251363324 0.033135699 0.144580124 -0.194139222 0.010261300 [36] 0.172052833 -0.201388410 0.110914066 0.046058535 -0.107468631 [41] 0.068990840 0.087513819 -0.216695923 0.165002609 0.073689960 [46] -0.229391123 0.258580266 -0.088959553 -0.107908162 0.160062218 [51] -0.130398566 -0.019185791 0.080874312 -0.076910723 0.007585949 [56] 0.104405891 -0.140786958 0.046860091 0.060612243 -0.136232050 [61] 0.077979106 > (mypacf <- c(rpacf$acf)) [1] -0.5437853163 -0.4714275774 0.1519176036 0.1593917675 -0.2286484551 [6] -0.0643138424 -0.0886368770 -0.0359343929 0.1809344232 0.0416976475 [11] -0.0824815442 -0.1439289992 -0.2730317690 -0.1754331946 -0.0228001294 [16] -0.0313859526 -0.0954471003 0.0352071321 0.0980760740 0.0592887053 [21] -0.0024465151 -0.2137383374 0.2979232122 -0.0407235032 -0.1093638569 [26] -0.1072154871 -0.0351891932 -0.0006031982 0.0061328103 -0.0372374954 [31] -0.0788558719 -0.1128553901 -0.0187938925 -0.1115682615 -0.0519919120 [36] -0.0760522589 0.0081195661 0.0127852288 0.0993535207 0.0480182328 [41] -0.0138479639 -0.1195511699 -0.0591895205 0.0865226896 -0.0212553435 [46] -0.0384076155 0.0097740071 -0.0725614397 0.0035659615 -0.1489887501 [51] 0.0570968130 -0.0190526615 -0.0091441137 -0.0461435027 -0.0185042040 [56] -0.0312379937 -0.0155141991 -0.1009798216 -0.0124499201 -0.0010026886 > 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/3xnj81229966651.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/4j8m31229966651.tab") > > system("convert tmp/1hg1t1229966651.ps tmp/1hg1t1229966651.png") > system("convert tmp/2d64q1229966651.ps tmp/2d64q1229966651.png") > > > proc.time() user system elapsed 0.587 0.324 0.722