R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(7.6,7.7,7.6,8.2,8,8.1,8.3,8.2,8.1,7.7,7.6,7.7,8.2,8.4,8.4,8.6,8.4,8.5,8.7,8.7,8.6,7.4,7.3,7.4,9,9.2,9.2,8.5,8.3,8.3,8.6,8.6,8.5,8.1,8.1,8,8.6,8.7,8.7,8.6,8.4,8.4,8.7,8.7,8.5,8.3,8.3,8.3,8.1,8.2,8.1,8.1,7.9,7.7,8.1,8,7.7,7.8,7.6,7.4,7.7) > 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/1gpwq1196273386.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/2kkpx1196273386.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.67281826 0.27209733 -0.06609245 -0.03410776 0.10844187 [7] 0.21985055 0.16241403 0.02459811 -0.02703670 0.08175497 0.22937245 [13] 0.30947401 0.12953680 -0.10096813 -0.29430883 -0.27727844 -0.15635717 [19] -0.04886708 -0.03085358 -0.09063018 -0.07019353 -0.08973197 -0.06450441 [25] -0.09077228 -0.08790694 -0.14005407 -0.16430034 -0.18958510 -0.15400030 [31] -0.11331996 -0.11563324 -0.17039737 -0.18886962 -0.17445624 -0.10241339 [37] -0.04222322 -0.00726151 -0.05802398 -0.10881414 -0.14946861 -0.13409981 [43] -0.09927657 -0.06099169 -0.03712109 -0.01333358 0.02734677 0.06121459 [49] 0.10606276 > (mypacf <- c(rpacf$acf)) [1] 0.6728182557 -0.3299505465 -0.1795508317 0.3982663393 0.0103009923 [6] -0.0702897739 0.0127933936 -0.0383411516 0.1233508276 0.1776562161 [11] -0.0006910007 0.0860175902 -0.2683818312 -0.0604519845 -0.0696240975 [16] -0.1327192327 0.0090248907 -0.0796901129 0.0093344086 0.0140413401 [21] 0.1092107899 -0.2568172071 0.0190155555 0.0309202041 0.0686083570 [26] -0.0788627788 0.0061522195 -0.0711433322 0.0001975889 -0.0430432834 [31] -0.2342486963 -0.0661071021 -0.0395847539 0.0480081648 -0.0048190414 [36] 0.0632996112 -0.0659147147 -0.0640905093 -0.0291564695 -0.0308176978 [41] -0.0472286065 -0.1082066583 0.1074778349 0.0362531702 0.0405262272 [46] -0.0919302167 -0.0568537342 0.0072842331 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/367g41196273386.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/43f231196273386.tab") > > system("convert tmp/1gpwq1196273386.ps tmp/1gpwq1196273386.png") > system("convert tmp/2kkpx1196273386.ps tmp/2kkpx1196273386.png") > > > proc.time() user system elapsed 0.866 0.332 0.953