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(11178.4,9516.4,12102.8,12989.0,11610.2,10205.5,11356.2,11307.1,12648.6,11947.2,11714.1,12192.5,11268.8,9097.4,12639.8,13040.1,11687.3,11191.7,11391.9,11793.1,13933.2,12778.1,11810.3,13698.4,11956.6,10723.8,13938.9,13979.8,13807.4,12973.9,12509.8,12934.1,14908.3,13772.1,13012.6,14049.9,11816.5,11593.2,14466.2,13615.9,14733.9,13880.7,13527.5,13584.0,16170.2,13260.6,14741.9,15486.5,13154.5,12621.2,15031.6,15452.4,15428,13105.9,14716.8,14180.0,16202.2,14392.4,15140.6,15960.1,14351.3,13230.2,15202.1,17157.3,16159.1,13405.7,17224.7,17338.4,17370.6,18817.8,16593.2,17979.5,17015.2) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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/1w3q51228410809.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/2zpu41228410809.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.675757771 0.523562865 0.583896644 0.562052515 [6] 0.523327367 0.506090201 0.399983557 0.421560794 0.356689946 [11] 0.251406389 0.328971064 0.515706238 0.306752157 0.183309345 [16] 0.209296049 0.225257225 0.219893625 0.203847916 0.140626345 [21] 0.152814169 0.086511730 0.022377713 0.092456877 0.189993961 [26] 0.073196837 -0.019149223 -0.036808804 -0.001456001 -0.018227522 [31] -0.037508094 -0.059794265 -0.078552926 -0.140269367 -0.166011174 [36] -0.114178024 -0.025382035 -0.113686745 -0.185662033 -0.183068932 [41] -0.142606374 -0.186167583 -0.198559674 -0.191956573 -0.200787013 [46] -0.246567369 -0.282278214 -0.258900609 -0.166418976 -0.228475839 [51] -0.317633017 -0.292350137 -0.241821220 -0.286815378 -0.294092948 [56] -0.283078591 -0.276902099 -0.267067997 -0.294131114 -0.272252617 [61] -0.192436164 > (mypacf <- c(rpacf$acf)) [1] 0.6757577709 0.1231510515 0.3558995873 0.1007752514 0.1203306031 [6] 0.0567949246 -0.1454535605 0.1224708843 -0.1832225675 -0.0895414805 [11] 0.1690891728 0.4452397100 -0.3410165019 -0.1233507235 -0.1155898959 [16] 0.0376892815 -0.0185158266 0.0531374038 0.1127802588 -0.1131141501 [21] -0.0527223458 -0.0038898835 0.0647839244 -0.1098161483 0.0476761386 [26] -0.0120486589 -0.0960114728 -0.0156815926 -0.0938085879 0.0532698187 [31] -0.0402689576 -0.0008877176 -0.0131374430 -0.0017411645 -0.0094106757 [36] 0.0740886670 -0.1009588086 -0.0153321617 0.0057192528 -0.0118556963 [41] -0.1385322216 -0.0361272459 0.0422417936 0.0160513852 0.0362526847 [46] -0.0775739583 -0.0390995102 -0.0704946119 0.0251340547 -0.0995207552 [51] 0.0402302529 0.0129935488 -0.0130684089 -0.0435120863 -0.0423108463 [56] 0.0004856558 0.0589505425 0.0631592931 0.0096146198 -0.0873531108 > 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/365gq1228410809.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/45atp1228410809.tab") > > system("convert tmp/1w3q51228410809.ps tmp/1w3q51228410809.png") > system("convert tmp/2zpu41228410809.ps tmp/2zpu41228410809.png") > > > proc.time() user system elapsed 0.609 0.325 0.698