R version 2.7.0 (2008-04-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(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 = '1' > 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/1crml1228412928.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/2i19v1228412928.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.336944731 -0.300880671 0.106869897 0.034216374 [6] -0.058641246 0.165923548 -0.146384699 0.111269805 0.037345888 [11] -0.278481763 -0.142263871 0.635652115 -0.209025043 -0.190880486 [16] 0.035501539 -0.019300536 0.047519091 0.070494687 -0.093282122 [21] 0.117399899 -0.022052651 -0.235398846 0.024626555 0.328167258 [26] -0.105629483 -0.069654180 -0.062066859 0.028990062 0.040286676 [31] -0.001797016 -0.008379543 0.082890857 -0.056726589 -0.160078479 [36] 0.005693547 0.264170640 -0.075462252 -0.068057248 -0.091837002 [41] 0.134967728 -0.028428885 -0.030167525 0.016892527 0.082058394 [46] -0.062441020 -0.080394488 -0.045810593 0.205555564 0.003429005 [51] -0.125653717 -0.055985012 0.138688418 -0.056931467 -0.001725558 [56] 0.003923251 0.012298785 0.010611539 -0.066164821 -0.019135374 [61] 0.107982846 > (mypacf <- c(rpacf$acf)) [1] -0.3369447306 -0.4674870455 -0.2878752095 -0.2818112850 -0.3175250896 [6] -0.0619129627 -0.2133936350 0.1063626320 0.2117739908 -0.0817147229 [11] -0.5768361636 0.0253981511 -0.0120948481 0.1226365649 0.0731211130 [16] -0.0276014322 0.0117769613 -0.1636368765 -0.0557223175 -0.0719947969 [21] -0.0468035910 -0.0881957454 0.0609180142 -0.0450957052 -0.0666581520 [26] 0.0204653036 -0.0561977999 0.1529494442 0.0365557994 0.0551939528 [31] -0.0003390985 -0.0559055953 -0.0134347389 -0.0400277833 -0.1598481766 [36] 0.0175496634 0.0138937061 -0.0178946753 -0.1357864478 0.0209385361 [41] 0.0215794117 0.0553984135 -0.0219355871 -0.0125062433 -0.0433792139 [46] 0.0127277499 0.0684233458 -0.0167097124 0.1103050050 0.0165276922 [51] 0.0867417644 -0.0323978558 -0.0709500638 0.0012555142 0.0190219399 [56] -0.0369023317 -0.0559138759 -0.0563993293 0.0548203421 0.0416155296 > 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/30mx11228412928.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/47sud1228412928.tab") > > system("convert tmp/1crml1228412928.ps tmp/1crml1228412928.png") > system("convert tmp/2i19v1228412928.ps tmp/2i19v1228412928.png") > > > proc.time() user system elapsed 1.552 0.565 1.641