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(27.00,26.88,27.38,26.82,27.00,26.15,25.85,26.17,25.66,25.72,25.42,25.10,26.20,26.39,26.27,26.63,21.10,20.30,20.61,21.05,20.45,20.91,21.22,20.85,21.90,22.71,22.40,22.81,23.96,23.37,23.55,23.01,22.63,22.63,22.00,22.15,22.00,22.00,21.84,22.10,22.37,21.83,21.77,21.89,20.76,20.21,20.19,20.01,19.16,18.50,17.41,18.14,18.60,18.32,18.40,18.16,17.29,16.65,16.36,16.32,17.37,17.30,18.10,19.00,18.38,18.41,18.10,17.87,18.70,18.81,18.88,19.44,18.60,18.80,18.62,18.24,17.84,17.85,17.67,17.99,18.15,18.39,18.07,18.39) > par5 = '12' > par4 = '0' > par3 = '1' > 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/153yz1243860390.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/2gxcm1243860390.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.0278255346 -0.0388315124 0.0301788630 -0.1683429022 [6] -0.0612359804 0.0297004395 -0.0491217061 -0.0422180626 -0.0691990330 [11] 0.0213147994 0.0496298573 -0.1079377690 0.0587563109 -0.1122302570 [16] 0.0664677478 0.0222219246 -0.0203375654 0.0473372941 -0.0728833683 [21] -0.0544970161 -0.0196285112 -0.0509795984 -0.0567507791 -0.0363503513 [26] 0.0089879274 -0.0097129286 0.0031081085 0.1321503234 -0.0234173571 [31] -0.0078287615 -0.0277678826 0.0480912419 0.0744392381 0.0753728689 [36] -0.0781825811 -0.0524672751 -0.0238629173 0.0210382002 0.0485145757 [41] 0.1067337874 0.1078156065 0.0096587371 -0.0001672429 -0.0875507687 [46] 0.0002819658 -0.1089004825 -0.0782975570 0.0443124241 > (mypacf <- c(rpacf$acf)) [1] 0.027825535 -0.039636462 0.032481243 -0.172319531 -0.049134117 [6] 0.017991772 -0.045660123 -0.064983890 -0.094629358 0.029550309 [11] 0.032209250 -0.134863348 0.036435410 -0.136980154 0.110360718 [16] -0.054887981 -0.012374631 0.013617196 -0.079144317 -0.030065952 [21] -0.078007891 -0.037099939 -0.087449230 -0.081853687 0.013487848 [26] -0.103740846 0.010864758 0.046376639 -0.040484719 -0.017395793 [31] -0.109549754 0.105578386 0.019330914 0.075901854 -0.129801451 [36] -0.044224911 0.028719905 0.001702251 0.034483889 0.084993696 [41] 0.131035510 0.066447262 -0.064776626 -0.045290892 0.026559781 [46] -0.054564756 -0.087345248 0.044644869 > 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/349fg1243860390.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/42kvj1243860390.tab") > > system("convert tmp/153yz1243860390.ps tmp/153yz1243860390.png") > system("convert tmp/2gxcm1243860390.ps tmp/2gxcm1243860390.png") > > > proc.time() user system elapsed 0.570 0.327 1.410