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(92.66,94.2,94.37,94.45,94.62,94.37,93.43,94.79,94.88,94.79,94.62,94.71,93.77,95.73,95.99,95.82,95.47,95.82,94.71,96.33,96.5,96.16,96.33,96.33,95.05,96.84,96.92,97.44,97.78,97.69,96.67,98.29,98.2,98.71,98.54,98.2,96.92,99.06,99.65,99.82,99.99,100.33,99.31,101.1,101.1,100.93,100.85,100.93,99.6,101.88,101.81,102.38,102.74,102.82,101.72,103.47,102.98,102.68,102.9,103.03,101.29) > par5 = '6' > par4 = '0' > par3 = '0' > par2 = '-1.2' > 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/1j0fv1228567694.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/2w9nw1228567694.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.00000000 0.91664739 0.87218789 0.82985984 0.78938300 0.74799444 [7] 0.73643688 0.64823081 0.59985789 0.55243230 0.50810962 0.46377537 [13] 0.45070328 0.37134392 0.32973152 0.28771861 0.24395030 0.19588268 [19] 0.18072512 0.10561480 0.06480584 0.02572285 -0.01567788 -0.05141929 [25] -0.05698025 -0.11532596 -0.14568202 -0.18221614 -0.21482378 -0.23822274 [31] -0.24255577 -0.28941105 -0.30961583 -0.33359919 -0.34972325 -0.36073598 [37] -0.35635092 -0.38846120 -0.39605417 -0.40117740 -0.40576839 -0.40985968 [43] -0.39601901 -0.40628858 -0.39648349 -0.38561795 -0.38017374 -0.37492896 [49] -0.35553010 -0.35236830 -0.32944289 -0.30785523 -0.28499979 -0.25919506 [55] -0.22479575 -0.19953860 -0.16367109 -0.13254138 -0.10347572 -0.07172371 [61] -0.03280410 > (mypacf <- c(rpacf$acf)) [1] 0.916647391 0.199962040 0.045275003 0.008945553 -0.017130231 [6] 0.172611993 -0.430704979 0.063829767 0.006085602 0.004301398 [11] 0.003321567 0.087916664 -0.216293667 0.015272532 -0.007457184 [16] -0.047424694 -0.051824858 0.051830861 -0.143640586 -0.023786998 [21] 0.002559795 -0.037476163 0.048731828 0.022668199 -0.074120606 [26] -0.056572061 -0.086401813 0.007144283 0.042210644 -0.061000701 [31] -0.020601127 -0.021500573 -0.027588598 0.029806594 -0.008812552 [36] -0.040992248 -0.028370942 -0.018306258 0.030838191 -0.038645889 [41] -0.047557856 0.022109929 0.055525962 -0.016878380 0.019239775 [46] -0.051832617 -0.049334965 -0.007911822 0.040401226 0.024396983 [51] 0.020022312 0.056688709 0.032781532 -0.012383752 0.057033513 [56] 0.011460180 -0.011721417 -0.005892285 0.029455518 0.016367959 > 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/3w06b1228567694.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/45lno1228567694.tab") > > system("convert tmp/1j0fv1228567694.ps tmp/1j0fv1228567694.png") > system("convert tmp/2w9nw1228567694.ps tmp/2w9nw1228567694.png") > > > proc.time() user system elapsed 0.596 0.323 0.696