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(14525.87 + ,14295.79 + ,13830.14 + ,14153.22 + ,15418.03 + ,16666.97 + ,16505.21 + ,17135.96 + ,18033.25 + ,17671 + ,17544.22 + ,17677.9 + ,18470.97 + ,18409.96 + ,18941.6 + ,19685.53 + ,19834.71 + ,19598.93 + ,17039.97 + ,16969.28 + ,16973.38 + ,16329.89 + ,16153.34 + ,15311.7 + ,14760.87 + ,14452.93 + ,13720.95 + ,13266.27 + ,12708.47 + ,13411.84 + ,13975.55 + ,12974.89 + ,12151.11 + ,11576.21 + ,9996.83 + ,10438.9 + ,10511.22 + ,10496.2 + ,10300.79 + ,9981.65 + ,11448.79 + ,11384.49 + ,11717.46 + ,10965.88 + ,10352.27 + ,9751.2 + ,9354.01 + ,8792.5 + ,8721.14 + ,8692.94 + ,8570.73 + ,8538.47 + ,8169.75 + ,7905.84 + ,8145.82 + ,8895.71 + ,9676.31 + ,9884.59 + ,10637.44 + ,10717.13 + ,10205.29 + ,10295.98 + ,10892.76 + ,10631.92 + ,11441.08 + ,11950.95 + ,11037.54 + ,11527.72 + ,11383.89 + ,10989.34 + ,11079.42 + ,11028.93 + ,10973 + ,11068.05 + ,11394.84 + ,11545.71 + ,11809.38 + ,11395.64 + ,11082.38 + ,11402.75 + ,11716.87 + ,12204.98 + ,12986.62 + ,13392.79 + ,14368.05 + ,15650.83 + ,16102.64 + ,16187.64 + ,16311.54 + ,17232.97 + ,16397.83 + ,14990.31 + ,15147.55 + ,15786.78 + ,15934.09 + ,16519.44 + ,16101.07 + ,16775.08 + ,17286.32 + ,17741.23 + ,17128.37 + ,17460.53 + ,17611.14 + ,18001.37 + ,17974.77 + ,16460.95 + ,16235.39 + ,16903.36 + ,15543.76 + ,15532.18 + ,13731.31 + ,13547.84 + ,12602.93 + ,13357.7 + ,13995.33 + ,14084.6 + ,13168.91 + ,12989.35 + ,12123.53 + ,9117.03 + ,8531.45) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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/1khm31229431954.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/2ipow1229431954.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.96277736 0.91588567 0.87692857 0.83629365 0.79323870 [7] 0.75107207 0.71009258 0.66370391 0.60840067 0.55098063 0.48977993 [13] 0.43514486 0.38204878 0.33572047 0.28078050 0.22508200 0.17455852 [19] 0.12728054 0.08013351 0.03365501 > (mypacf <- c(rpacf$acf)) [1] 0.96277736 -0.15130870 0.10349294 -0.07738102 -0.03084486 -0.01421252 [7] -0.01455048 -0.10043190 -0.13075396 -0.05269380 -0.11074643 0.07565698 [13] -0.05893663 0.08886947 -0.20325938 0.03382654 -0.01498665 0.02665057 [19] -0.03783782 -0.04596603 > 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/3b6cf1229431954.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/4ru9t1229431954.tab") > > system("convert tmp/1khm31229431954.ps tmp/1khm31229431954.png") > system("convert tmp/2ipow1229431954.ps tmp/2ipow1229431954.png") > > > proc.time() user system elapsed 0.548 0.332 0.655