R version 2.8.1 (2008-12-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(4.43,4.43,4.44,4.44,4.44,4.45,4.47,4.48,4.48,4.5,4.52,4.52,4.53,4.53,4.63,4.66,4.67,4.68,4.69,4.69,4.7,4.71,4.72,4.72,4.72,4.73,4.74,4.76,4.81,4.82,4.83,4.83,4.84,4.89,4.92,4.95,4.95,5.01,5.05,5.08,5.11,5.14,5.17,5.18,5.2,5.22,5.24,5.28,5.29,5.33,5.4,5.43,5.46,5.46,5.46,5.47,5.49,5.5,5.54,5.55,5.55,5.56,5.6,5.61,5.63,5.64,5.66,5.67,5.69,5.77,5.77,5.78,5.8,5.82,5.85,5.87,5.88,5.9,5.91,5.94,5.97,5.98,6,6.01,6.02) > par5 = '12' > par4 = '0' > par3 = '0' > 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/1plbn1241085376.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/2ccfc1241085376.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.969907932 0.938693549 0.906849559 0.874454990 [6] 0.841064933 0.807690491 0.774810781 0.741269757 0.707155507 [11] 0.672895298 0.638820801 0.604554571 0.570026639 0.534925481 [16] 0.502333637 0.469716108 0.439492736 0.409238670 0.378595062 [21] 0.347387287 0.315876033 0.284415615 0.252538480 0.220937168 [26] 0.188535138 0.155380192 0.122102948 0.090023528 0.058945618 [31] 0.027986488 -0.003280651 -0.035539760 -0.068506491 -0.099523012 [36] -0.129248614 -0.156288675 > (mypacf <- c(rpacf$acf)) [1] 0.9699079316 -0.0342087528 -0.0263920237 -0.0256331155 -0.0336986002 [6] -0.0171389810 -0.0097257174 -0.0297516592 -0.0285150818 -0.0221157746 [11] -0.0171955162 -0.0236145510 -0.0253841798 -0.0317485656 0.0200749157 [16] -0.0230439508 0.0183173098 -0.0233944993 -0.0302010045 -0.0322407603 [21] -0.0281379383 -0.0233292301 -0.0312488267 -0.0213125272 -0.0400927300 [26] -0.0401425582 -0.0299070513 -0.0096254531 -0.0109292845 -0.0285799285 [31] -0.0328602905 -0.0491907335 -0.0438918073 -0.0008904932 -0.0135473333 [36] 0.0105475875 > 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/3afqp1241085376.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/4cjfw1241085376.tab") > > system("convert tmp/1plbn1241085376.ps tmp/1plbn1241085376.png") > system("convert tmp/2ccfc1241085376.ps tmp/2ccfc1241085376.png") > > > proc.time() user system elapsed 0.545 0.310 0.754