R version 2.6.1 (2007-11-26) Copyright (C) 2007 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(37702,30364,32609,30212,29965,28352,25814,22414,20506,28806,22228,13971,36845,35338,35022,34777,26887,23970,22780,17351,21382,24561,17409,11514,31514,27071,29462,26105,22397,23843,21705,18089,20764,25316,17704,15548,28029,29383,36438,32034,22679,24319,18004,17537,20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '-0.5' > 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/rcomp/tmp/1vycx1197573785.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/20nt71197573785.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.305387684 0.078952130 0.087751095 -0.013297097 [6] -0.081506434 -0.229905136 -0.151414820 -0.082347732 -0.040095207 [11] -0.052277241 0.152673679 0.681703287 0.206913296 0.022489631 [16] 0.033460544 -0.068936285 -0.110006482 -0.229364377 -0.170469331 [21] -0.101114790 -0.105696586 -0.099731535 0.077217074 0.457522431 [26] 0.142237012 0.004072299 -0.013187812 -0.062288626 -0.092914984 [31] -0.183468803 -0.095592767 -0.043683883 -0.046014909 -0.037160723 [36] 0.054876538 0.366837436 0.115229974 0.022719853 0.017391284 [41] -0.030760261 -0.085578834 -0.164563604 -0.121060624 -0.109803001 [46] -0.112725225 -0.084878244 -0.061333438 0.148845371 > (mypacf <- c(rpacf$acf)) [1] 0.305387684 -0.015781297 0.075099896 -0.067086120 -0.067678690 [6] -0.211427223 -0.018504282 -0.020665377 0.027585646 -0.054654660 [11] 0.194225992 0.653168827 -0.257293853 -0.142263256 -0.134791906 [16] -0.096074606 -0.043140839 0.062045061 0.056350077 0.014710793 [21] -0.046985380 -0.003848164 -0.035108426 -0.070247307 -0.021871843 [26] 0.007559291 -0.068631078 0.076744862 0.014729257 0.017439071 [31] 0.081843242 0.013586527 0.059566041 0.011174439 -0.106742820 [36] 0.053867223 -0.076372153 0.056272110 0.108513027 0.027840761 [41] -0.065281428 -0.044840517 -0.195764036 -0.161339736 -0.106717174 [46] 0.012170319 -0.023692602 -0.138456324 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3cwhq1197573785.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4ahlb1197573785.tab") > > system("convert tmp/1vycx1197573785.ps tmp/1vycx1197573785.png") > system("convert tmp/20nt71197573785.ps tmp/20nt71197573785.png") > > > proc.time() user system elapsed 1.543 0.549 1.624