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(1.88,1.87,1.88,1.87,1.88,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.88,1.88,1.87,1.87,1.87,1.87,1.87,1.87,1.87,1.86,1.86,1.85,1.84,1.83,1.82,1.78,1.75,1.74,1.74,1.74,1.73,1.73,1.73,1.71,1.7,1.7,1.69,1.68,1.68,1.68,1.68,1.67,1.66,1.65,1.65,1.65) > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > 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/1xxth1291642189.ps",horizontal=F,onefile=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/2xxth1291642189.ps",horizontal=F,onefile=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.345974985 0.203953664 0.119180727 0.190917485 [6] 0.055359691 0.050919164 0.148048351 0.169000252 0.048216234 [11] 0.029001931 0.075346260 0.005347100 -0.028640980 -0.033081508 [16] -0.139091749 -0.031343910 -0.010392009 -0.014832536 -0.135616553 [21] -0.169604634 -0.030000839 -0.063988920 -0.159380509 -0.077025099 [26] -0.121631831 -0.100679929 -0.170679090 -0.073549903 -0.092764207 [31] 0.004364979 -0.116419038 -0.084848485 -0.154847645 -0.036481155 [36] 0.026945354 -0.032435155 > (mypacf <- c(rpacf$acf)) [1] 0.3459749853 0.0957115168 0.0255180023 0.1459275223 -0.0686624556 [6] 0.0126995242 0.1429074338 0.0663826791 -0.0615507987 -0.0044211509 [11] 0.0368887006 -0.0690847390 -0.0157045998 -0.0267072297 -0.1923861696 [16] 0.0886665941 0.0433279513 -0.0484470453 -0.1108448446 -0.1111604154 [21] 0.1042396394 -0.0038610036 -0.1006643882 0.0230353385 -0.1396825321 [26] 0.0410997228 -0.0420851963 -0.0007322775 -0.0593656556 0.0932765730 [31] -0.0636895132 -0.0576215835 -0.0804816114 0.0468981822 0.0772544941 [36] -0.0004643944 > 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/3t68q1291642189.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/44yqb1291642189.tab") > > try(system("convert tmp/1xxth1291642189.ps tmp/1xxth1291642189.png",intern=TRUE)) character(0) > try(system("convert tmp/2xxth1291642189.ps tmp/2xxth1291642189.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.558 0.368 1.655