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(613.20,614.70,618.40,628.20,629.00,629.70,630.40,630.40,639.30,639.40,640.90,640.80,642.10,645.30,647.60,648.40,648.80,648.90,648.90,648.90,650.30,650.30,650.00,650.00,650.50,658.40,666.00,675.50,680.70,690.60,690.60,691.10,692.90,693.80,692.80,697.50,699.00,702.10,704.80,715.50,721.80,726.40,727.70,727.40,731.30,734.40,733.40,733.40,738.10,742.60,747.20,751.10,752.60,758.90,759.10,764.30,765.60,767.60,767.60,765.60,768.20,770.90,775.10,777.60,778.60,778.90,779.40,779.90,781.70,789.10,788.70,788.80,790.80,794.10,795.10,797.30,803.80,805.60,804.60,804.50,805.80,806.80,805.20,814.90,816.60,819.50,823.00,824.00,831.40,831.70,831.10,832.10,833.30,838.80,838.00,837.30,994.20,994.20,994.20,994.20,994.20,1092.60,1100.00,1100.00,1092.60,1000.70,1000.70,1000.50,1000.50,1000.50,1000.50,1000.50,1000.50,1087.70,1113.20,1116.00,1085.20,1031.30,1028.70,1027.50,1027.50,1027.50,1027.50,1027.50,1027.50,1152.20,1155.30,1154.00,1119.90,1079.30,1074.30,1069.80) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '10' > #'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/freestat/rcomp/tmp/1hwts1250092989.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/freestat/rcomp/tmp/2d8fm1250092989.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.0000000 0.9719881 0.9412308 0.9103090 0.8794230 0.8515978 0.8189851 [8] 0.7865073 0.7637747 0.7459091 0.7344728 > (mypacf <- c(rpacf$acf)) [1] 0.971988059 -0.063904094 -0.016462925 -0.015370444 0.039163185 [6] -0.107608422 -0.006623904 0.160876920 0.062784737 0.088784773 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3w15v1250092989.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/freestat/rcomp/tmp/4hf0v1250092989.tab") > > system("convert tmp/1hwts1250092989.ps tmp/1hwts1250092989.png") > system("convert tmp/2d8fm1250092989.ps tmp/2d8fm1250092989.png") > > > proc.time() user system elapsed 0.722 0.410 0.826