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(66.2,66.2,66.2,66.08,66.31,66.39,66.37,66.23,66.27,66.27,66.27,66.28,66.28,66.28,66.26,66.13,65.86,65.9,65.94,65.94,65.91,65.95,65.91,66.08,66.47,66.47,66.56,66.78,67.08,67.28,67.27,67.27,67.26,67.37,67.5,67.63,67.64,67.64,67.71,67.87,67.93,68.33,68.39,68.39,68.58,68.44,68.49,68.52,68.54,68.54,68.54,68.62,68.75,68.71,68.72,68.72,68.72,68.92,68.9,69.12,69.09,69.09,69.1,69.16,68.83,68.52,68.53,68.53,68.51,68.38,68.44,68.41,68.42,68.42,68.45,68.63,68.84,68.72,68.37,68.37,68.47,68.69,68.46,68.17,68.17) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1yv211229033160.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/27n7q1229033160.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.253035605 -0.052141204 -0.022356955 0.165729635 [6] 0.250470219 0.078651521 -0.056047940 -0.107632009 0.038597507 [11] 0.002272315 -0.021897550 -0.117116045 0.170532490 0.090718967 [16] 0.079024623 0.015229212 0.063629473 0.180363892 0.041738817 [21] 0.013555529 -0.180029665 -0.006812116 -0.065646386 -0.017514846 [26] -0.155909804 -0.197481513 -0.087199454 -0.028843604 0.052698050 [31] -0.040316923 -0.070466047 -0.048225700 0.072254176 -0.007815201 [36] 0.035294639 -0.149048026 -0.130850623 -0.102240426 -0.058891384 [41] -0.041994446 -0.229260505 -0.075094223 -0.103925472 -0.105014752 [46] -0.073747611 0.051053771 0.059253195 0.073190405 > (mypacf <- c(rpacf$acf)) [1] 0.2530356054 -0.1241149303 0.0259123425 0.1723770383 0.1748627829 [6] -0.0061474309 -0.0412643776 -0.1059289724 0.0259475518 -0.0946421116 [11] 0.0003510845 -0.0819016828 0.2992592926 -0.0432362760 0.1464740900 [16] -0.0181844619 0.0978963351 0.0290569638 -0.0781229298 -0.0352287724 [21] -0.2050091830 0.0222846476 -0.1693628100 0.0639988367 -0.0861580239 [26] -0.0755021636 0.0259835810 -0.0230752784 0.1144694897 -0.0184037534 [31] -0.0824418060 0.0227815355 -0.0849446470 0.0269028220 -0.0484126707 [36] -0.1050990493 -0.0848484312 -0.0881291467 0.1021922802 -0.0498811499 [41] -0.0345891685 0.0321294236 -0.0456747698 -0.0842579399 -0.0100211796 [46] 0.0738668016 0.0076755625 0.0623769674 > 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/33s7v1229033160.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/42kd71229033160.tab") > > system("convert tmp/1yv211229033160.ps tmp/1yv211229033160.png") > system("convert tmp/27n7q1229033160.ps tmp/27n7q1229033160.png") > > > proc.time() user system elapsed 0.803 0.410 0.946