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 = '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/rcomp/tmp/1vy721292593915.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/2vy721292593915.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.000000000 0.219940051 0.284352497 0.337031584 0.200117748 [6] 0.125277471 0.196557674 0.078285137 0.134449135 0.019970240 [11] -0.135500457 0.158880468 -0.233377246 -0.185353090 -0.034775458 [16] -0.065993499 -0.154007500 -0.058467577 -0.149728671 -0.090822836 [21] -0.162058900 -0.281687728 -0.110530715 -0.207963669 -0.221451433 [26] -0.089486792 -0.147297514 -0.276448014 -0.182808753 -0.153335430 [31] -0.101472963 -0.010822052 -0.075792173 0.053561121 0.008536491 [36] 0.063457494 0.026504770 0.032932922 0.043687348 0.068434781 [41] 0.100974630 0.107922140 0.126001463 0.038345167 0.075820253 [46] -0.005159471 0.004524324 0.026402439 0.034799208 0.053238101 [51] 0.016999671 0.014008520 -0.007511039 -0.002819921 -0.010933132 [56] -0.003349837 0.010548754 0.001335234 -0.002793937 -0.001147027 > (mypacf <- c(rpacf$acf)) [1] 0.219940051 0.247974286 0.263640677 0.060537509 -0.051708170 [6] 0.057290768 -0.035889263 0.062147729 -0.086590508 -0.237885575 [11] 0.200207859 -0.273274130 -0.121633098 0.054327831 0.109074197 [16] 0.011331141 -0.067204788 -0.043669977 -0.009444136 -0.082617359 [21] -0.184374862 -0.136695823 0.002729691 -0.022669599 -0.005677790 [26] -0.071515422 -0.120802121 -0.080171172 0.037078747 0.039399304 [31] 0.119452831 0.002102071 -0.014763075 -0.090192611 0.101399052 [36] -0.093405912 -0.129115885 0.024476390 -0.050393172 0.012157043 [41] 0.007636714 0.025143222 0.009061239 -0.059603889 -0.091032033 [46] -0.142598973 0.064074738 -0.024381517 -0.079809130 -0.101234750 [51] -0.015549750 0.033931307 -0.002562778 0.002483455 -0.072360854 [56] 0.038772198 -0.017930871 -0.067250268 0.027113508 > 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/3rpnt1292593915.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/42hnw1292593915.tab") > > try(system("convert tmp/1vy721292593915.ps tmp/1vy721292593915.png",intern=TRUE)) character(0) > try(system("convert tmp/2vy721292593915.ps tmp/2vy721292593915.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.610 0.480 1.069