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(14929387.5,14717825.3,15826281.2,16301309.6,15033016.9,16998460.6,14066462.7,13328937.3,17319718.2,17586426.8,15887037.4,17935679.1,15869489,15892510.9,17556558.1,16791643,15953688.5,18144913.6,14390881,13885708.7,17332571.5,17152595.8,16003877.1,16841467.1,14783398.1,14667847.5,17714362.2,16282088,15014866.2,17722582.4,13876509.4,15495489.6,17799521.1,17920079.1,17248022.4,18813782.4,16249688.3,17823358.5,20424438.3,17814218.7,19699959.6,19776328.1,15679833.1,17119266.5,20092613,20863688.3,20925203.1,21032593,20664684.3,19711511.4,22553293.4,19498332.9,20722827.8,21321275,17960847.7,17789654.9,20003708.5,21169851.7,20422839.4,19810562.3) > par5 = '12' > par4 = '0' > 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/10a601229007222.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/2y0cr1229007222.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.3544210645 -0.3498780436 0.4409123518 -0.3288096597 [6] -0.1720143660 0.5890450250 -0.2694268206 -0.2070322163 0.3976115725 [11] -0.3999251302 -0.1590144469 0.6880837450 -0.2862091393 -0.2087524120 [16] 0.3166326758 -0.3329212307 -0.0440327658 0.4294491855 -0.2500627064 [21] -0.0982779617 0.2810053828 -0.3780109941 0.0097178191 0.4436686610 [26] -0.2817064756 -0.0367952909 0.1736830165 -0.2499807316 0.0407652971 [31] 0.2427973663 -0.1878564505 0.0121097765 0.1339883968 -0.2744536428 [36] 0.0795499275 0.2256229454 -0.1006952532 -0.0577279161 0.0705810559 [41] -0.1035178718 0.0187109893 0.1049180035 -0.0734987008 -0.0110606110 [46] 0.0787657740 -0.1239378573 0.0229880875 0.0919251034 -0.0287215169 [51] -0.0188393833 -0.0094052254 -0.0069353053 0.0029431888 0.0111694907 [56] 0.0049066135 -0.0064492835 -0.0020953927 0.0009144151 > (mypacf <- c(rpacf$acf)) [1] -0.3544210645 -0.5438015850 0.0921381741 -0.4088273450 -0.3939664973 [6] 0.1468779473 0.0002345464 -0.0099562085 0.1175288838 -0.2261234887 [11] -0.3846699051 0.2002267335 0.1794568875 0.1499759078 -0.0664766732 [16] -0.0464257619 0.0261939497 -0.1217263108 -0.0820474235 -0.1004085350 [21] -0.0819141618 -0.1661423803 -0.0035016316 -0.0266796028 -0.1607736406 [26] -0.0850931543 -0.1492519920 0.0876544434 -0.0018586112 -0.0903883260 [31] -0.0439360650 -0.0360860083 -0.0242730350 -0.0400233598 -0.0661132178 [36] -0.1664434433 0.2015205907 -0.0383232501 0.0196258491 0.0133656188 [41] -0.0276106265 -0.0320090032 -0.0992635417 -0.1153975333 -0.0432682108 [46] 0.0356495259 0.0488532041 0.0077303456 -0.2225226611 -0.0590005952 [51] -0.0689512447 -0.0774171463 -0.0034885179 -0.0805858075 0.0121140339 [56] 0.0320656522 0.0160832568 -0.0540179180 > 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/3d8wd1229007222.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/4dtw71229007222.tab") > > system("convert tmp/10a601229007222.ps tmp/10a601229007222.png") > system("convert tmp/2y0cr1229007222.ps tmp/2y0cr1229007222.png") > > > proc.time() user system elapsed 0.597 0.332 0.712