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(11.836,11.85,11.897,12.082,11.936,11.928,12.646,12.747,12.447,12.445,12.257,12.878,13.69,13.665,13.78,13.608,13.375,13.376,13.918,14.304,13.877,14.543,14.291,14.788,15.241,15.265,15.322,15.175,14.817,14.579,15.247,15.385,14.891,14.766,14.42,14.85,15.117,15.352,15.099,15.291,15.208,14.995,15.454,15.251,14.975,14.005,13.55,13.422,13.848,13.376,13.038,12.974,12.554,11.971,12.916,12.757,11.924,11.693,11.382,11.821) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/1qpwk1228241984.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/2hfh11228241984.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.153726363 0.271547850 -0.054015696 0.155472122 [6] -0.032551641 -0.187606477 0.027902838 -0.260762530 0.086456494 [11] -0.194842289 0.059843379 -0.301725240 0.016284094 -0.002338377 [16] -0.047055035 0.058899895 -0.033815764 0.281943740 0.028574891 [21] 0.156278837 -0.065225754 -0.036686426 0.114070883 -0.259591434 [26] 0.016334968 -0.265950882 0.117571793 -0.145001782 0.039498919 [31] -0.066324045 -0.058597856 0.015777743 0.010746833 0.024411327 [36] -0.078692940 0.111223520 > (mypacf <- c(rpacf$acf)) [1] -0.1537263631 0.2539165595 0.0176945534 0.0900776022 0.0054465152 [6] -0.2761108567 -0.0215423050 -0.1923205912 0.0398648854 -0.0097097349 [11] -0.0012607302 -0.2749593738 -0.1201021199 0.0547234629 -0.0110071074 [16] 0.0625243859 0.0130519214 0.1243933112 0.1031922880 -0.0293741443 [21] -0.1081211453 -0.2115505272 0.1261277707 -0.2267570034 -0.0690176471 [26] -0.0766290179 0.0201421326 0.0295787137 0.0040321523 0.0001916753 [31] -0.0569843943 -0.1213179160 0.0386116195 -0.1558167141 0.0197414531 [36] -0.1436407465 > 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/33tvl1228241984.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/44knm1228241984.tab") > > system("convert tmp/1qpwk1228241984.ps tmp/1qpwk1228241984.png") > system("convert tmp/2hfh11228241984.ps tmp/2hfh11228241984.png") > > > proc.time() user system elapsed 0.556 0.338 0.660