R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(548604,563668,586111,604378,600991,544686,537034,551531,563250,574761,580112,575093,557560,564478,580523,596594,586570,536214,523597,536535,536322,532638,528222,516141,501866,506174,517945,533590,528379,477580,469357,490243,492622,507561,516922,514258,509846,527070,541657,564591,555362,498662,511038,525919,531673,548854,560576,557274,565742,587625,619916,625809,619567,572942,572775,574205,579799,590072,593408,597141,595404,612117,628232,628884,620735,569028,567456,573100,584428,589379,590865,595454,594167) > par8 = '' > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '0' > 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/rcomp/tmp/1h7ru1292592847.ps",horizontal=F,onefile=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/rcomp/tmp/2h7ru1292592847.ps",horizontal=F,onefile=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.0000000000 0.9759271077 0.9416956060 0.8941558358 0.8308384222 [6] 0.7586989899 0.6799672515 0.5918066427 0.5001094178 0.4029213702 [11] 0.3056152259 0.2156268833 0.1196937094 0.0352455401 -0.0393763258 [16] -0.1125071882 -0.1816906334 -0.2430590487 -0.3014256352 -0.3516743700 [21] -0.3968039400 -0.4348694898 -0.4603623923 -0.4797690679 -0.4908416678 [26] -0.4920442422 -0.4904104185 -0.4818170054 -0.4605429188 -0.4305702475 [31] -0.3933007334 -0.3516157922 -0.3106976038 -0.2659217462 -0.2235207264 [36] -0.1821939911 -0.1441119292 -0.1088397837 -0.0761595350 -0.0471259175 [41] -0.0218252383 -0.0029994480 0.0098681008 0.0164506272 0.0212219521 [46] 0.0222165241 0.0231776575 0.0240987078 0.0235917921 0.0218553493 [51] 0.0173909393 0.0131503413 0.0090585126 0.0064267563 0.0049562101 [56] 0.0041416441 0.0036433889 0.0019308306 0.0008161332 0.0000428013 [61] -0.0002632351 > (mypacf <- c(rpacf$acf)) [1] 0.975927108 -0.225750539 -0.266381631 -0.298991445 -0.109923275 [6] -0.040519324 -0.138825894 -0.043758898 -0.118331207 0.012910266 [11] 0.168959796 -0.238157942 0.177951316 0.089476537 -0.125023009 [16] -0.173293421 -0.064814046 -0.033958392 -0.009808722 -0.065907331 [21] -0.002474849 0.113226884 0.120191516 -0.044352107 -0.036965839 [26] -0.059069116 0.033845213 0.090109976 0.082385494 -0.042718100 [31] -0.070256674 -0.149613065 -0.011376896 -0.056620400 0.032777365 [36] -0.157220420 0.011704965 0.067603696 -0.051205398 0.046098617 [41] -0.044918566 -0.069790504 -0.045200881 -0.046945521 0.015676008 [46] 0.051904155 0.093551306 -0.090577833 -0.024531569 0.014061471 [51] 0.073325100 0.004210673 -0.032449498 -0.052356448 -0.032496633 [56] 0.085520608 -0.045110919 -0.022961161 0.011164494 -0.050680416 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/3kqpi1292592847.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/rcomp/tmp/4nqn61292592847.tab") > > try(system("convert tmp/1h7ru1292592847.ps tmp/1h7ru1292592847.png",intern=TRUE)) character(0) > try(system("convert tmp/2h7ru1292592847.ps tmp/2h7ru1292592847.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.710 0.360 1.071