R version 2.7.0 (2008-04-22) 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(1.83,1.89,1.9,2.01,2.04,2.04,2.03,2.04,1.87,1.85,1.82,1.79,1.88,2.01,1.9,1.96,1.94,1.92,1.79,1.77,1.74,1.75,1.86,1.84,1.77,1.98,1.94,1.85,1.84,1.82,1.83,1.91,1.85,1.81,1.83,1.79,1.8,1.82,1.88,2.01,1.97,1.92,1.98,2.02,1.9,1.94,1.96,1.84,1.87,1.84,2.07,2.08,2.14,2.15,2.05,2.05,1.95,2.02,2.02,1.88,1.96,1.93,2.03,2.1,1.95,2.07,2.09,2.01,1.92,1.99,2.11,2) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '48' > ylab = '' > xlab = '' > main = '' > #'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/1qttt1231878775.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/2actw1231878775.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.680406246 0.470971571 0.355912500 0.192714939 [6] 0.118084764 0.080865074 0.159105274 0.276988170 0.333160868 [11] 0.373994301 0.336956756 0.382486945 0.276942195 0.157730947 [16] 0.068393441 -0.009043262 -0.020030264 -0.012969978 -0.023066695 [21] -0.041622034 -0.118339448 -0.167355857 -0.121069206 -0.065138130 [26] -0.085176654 -0.048837386 -0.036641708 -0.134969402 -0.231053730 [31] -0.275137337 -0.321943836 -0.327546389 -0.322595647 -0.306829542 [36] -0.181233336 -0.126350526 -0.082039599 -0.065909203 -0.104206898 [41] -0.114244140 -0.198533609 -0.288162919 -0.264800598 -0.184374651 [46] -0.111143456 -0.093728748 -0.016841631 0.019057142 > (mypacf <- c(rpacf$acf)) [1] 0.6804062457 0.0149314812 0.0560333477 -0.1363988066 0.0383999918 [6] 0.0074500658 0.2213621503 0.1812966707 0.0831206004 0.0605485457 [11] -0.0466049152 0.2259536095 -0.1421506145 -0.0069106944 -0.1507355410 [16] -0.0313230964 -0.0401003784 0.0060456048 -0.1224037672 -0.1935776031 [21] -0.2411632624 -0.1721163774 0.1867850440 0.0671195445 -0.0395418217 [26] -0.0134464710 -0.0002191986 -0.1138956740 -0.0153493222 0.0509074694 [31] -0.0551350336 -0.0042210200 -0.0260072797 0.0212158316 0.1474357273 [36] -0.0994115418 0.0727749411 -0.0591452013 0.0375575720 0.1539402270 [41] -0.0009741502 -0.1838105226 -0.0497892617 0.1312031519 0.0924613422 [46] 0.0448232280 -0.0925919463 -0.0484976715 > 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/3yu6s1231878775.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/4xjpr1231878775.tab") > > system("convert tmp/1qttt1231878775.ps tmp/1qttt1231878775.png") > system("convert tmp/2actw1231878775.ps tmp/2actw1231878775.png") > > > proc.time() user system elapsed 1.520 0.542 1.608