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(102.2,102.4,102.4,102.5,102.5,102.6,102.8,102.9,102.9,103.1,103.2,103.3,103.6,103.7,103.8,104,104,104.1,104.2,104.3,104.4,104.5,104.7,104.7,104.9,105,105.2,105.3,105.4,105.5,105.7,105.8,105.9,106,106.1,106.2,106.6,106.8,107,107.1,107.3,107.4,107.6,107.7,107.9,108.2,108.3,108.5,108.92,109.23,109.41,109.65,109.91,110.01,110.2,110.49,110.57,110.72,110.94,111.09,111.28,111.41,111.62,111.76,111.89,112.04,112.12,112.3,112.47,112.59,112.78,112.73,112.99,113.1,113.33,113.38,113.68,113.65,113.81,113.88,114.02,114.25,114.28,114.38,114.73,114.97,115.05,115.29,115.37,115.54,115.76,115.92,116.02,116.21,116.26,116.51) > par5 = '12' > par4 = '0' > par3 = '0' > 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: 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/12we41250605182.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/2ud8v1250605182.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.971690989 0.944035217 0.915390039 0.886691178 [6] 0.857218658 0.827653454 0.798503013 0.769325477 0.739361951 [11] 0.709987629 0.680223900 0.650692085 0.622563370 0.594202482 [16] 0.565285437 0.536998793 0.508318784 0.479301126 0.450317190 [21] 0.420581375 0.391528852 0.362051996 0.333329374 0.304105982 [26] 0.275734418 0.246582829 0.218035316 0.189437092 0.161042660 [31] 0.132893756 0.104916550 0.077091941 0.049329598 0.021646383 [36] -0.005599094 -0.032745957 -0.058564464 -0.083813956 -0.108206101 [41] -0.132383786 -0.156267762 -0.179265568 -0.201480301 -0.223616982 [46] -0.244609674 -0.264168474 -0.283249251 -0.300918454 > (mypacf <- c(rpacf$acf)) [1] 0.971690989 -0.002654447 -0.031820944 -0.016319580 -0.028818181 [6] -0.017818592 -0.008316215 -0.016426798 -0.030687409 -0.006930415 [11] -0.023667978 -0.014041037 0.008087965 -0.021272555 -0.028828816 [16] -0.007174754 -0.025502720 -0.025844055 -0.017949297 -0.033917025 [21] -0.009550755 -0.026853874 -0.008809135 -0.030080109 -0.006680270 [26] -0.036215804 -0.013836884 -0.022553214 -0.021818969 -0.019681123 [31] -0.022086833 -0.023003635 -0.024936624 -0.024397793 -0.019890978 [36] -0.025013736 -0.004039175 -0.017233358 -0.012754446 -0.023801708 [41] -0.024058940 -0.013211497 -0.013880793 -0.028385726 -0.008754915 [46] -0.003840181 -0.019709667 -0.004203877 > 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/3r0di1250605182.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/41ff01250605182.tab") > > system("convert tmp/12we41250605182.ps tmp/12we41250605182.png") > system("convert tmp/2ud8v1250605182.ps tmp/2ud8v1250605182.png") > > > proc.time() user system elapsed 0.567 0.317 0.706