R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(101.0,98.7,105.1,98.4,101.7,102.9,92.2,94.9,92.8,98.5,94.3,87.4,103.4,101.2,109.6,111.9,108.9,105.6,107.8,97.5,102.4,105.6,99.8,96.2,113.1,107.4,116.8,112.9,105.3,109.3,107.9,101.1,114.7,116.2,108.4,113.4,108.7,112.6,124.2,114.9,110.5,121.5,118.1,111.7,132.7,119.0,116.7,120.1,113.4,106.6,116.3,112.6,111.6,125.1,110.7,109.6,114.2,113.4,116.0,109.6,117.8,115.8,125.3,113.0,120.5,116.6,111.8,115.2,118.6,122.4,116.4,114.5,119.8,115.8,127.8,118.8,119.7,118.6,120.8,115.9,109.7,114.8,116.2,112.2) > par7 = '' > par6 = 'White Noise' > 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/1zs401261343728.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/2l9wf1261343728.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.473846875 -0.088583042 0.280608451 -0.223455544 [6] -0.086249459 0.254984316 -0.205668956 -0.087377594 0.326583530 [11] -0.282602240 -0.057832149 0.426436225 -0.367363332 0.128175550 [16] 0.026827110 -0.138030913 0.056745528 0.157105705 -0.283537699 [21] 0.208981183 0.056712033 -0.239020839 0.097589589 0.113757032 [26] -0.155052507 0.096843052 -0.040940099 -0.045497245 0.077534407 [31] 0.057924953 -0.134148869 0.160321618 -0.097415276 -0.053953346 [36] 0.020309940 0.049772349 -0.018116145 0.016128270 -0.046415482 [41] 0.035107264 -0.005098249 -0.020801477 -0.021162443 0.068821938 [46] -0.049859238 0.034825888 -0.113226811 0.152663104 -0.047521695 [51] 0.027422804 -0.058175081 0.018496939 0.015605912 -0.030398931 [56] 0.005517969 -0.019146859 0.023856043 0.001192271 -0.059603799 [61] 0.117093687 > (mypacf <- c(rpacf$acf)) [1] -0.473846875 -0.403773519 0.046774353 -0.081759630 -0.242453917 [6] 0.001080768 -0.081391766 -0.244482976 0.066654798 -0.086787426 [11] -0.252532104 0.198519186 0.009384876 0.116150324 -0.158605422 [16] -0.058490324 0.007816906 0.071261753 -0.116070279 0.124319785 [21] 0.021691007 -0.008021653 -0.146628913 -0.030708198 0.087489030 [26] -0.057008289 -0.090055325 0.042834023 -0.013406443 0.021402615 [31] 0.095432680 0.085734370 -0.014791717 -0.070563372 -0.036576522 [36] 0.061096779 0.050138419 -0.029405480 0.007405035 0.044449666 [41] -0.053756531 -0.124381050 -0.056599494 0.010344218 -0.009740689 [46] 0.024847302 -0.100507810 0.039599435 -0.047478684 0.094242925 [51] -0.003035152 -0.044603836 0.056252324 0.021883046 0.002688810 [56] -0.085952146 -0.105645554 -0.001788111 0.027396999 -0.035271537 > 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/3uuv41261343728.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/48bqy1261343728.tab") > try(system("convert tmp/1zs401261343728.ps tmp/1zs401261343728.png",intern=TRUE)) character(0) > try(system("convert tmp/2l9wf1261343728.ps tmp/2l9wf1261343728.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.600 0.327 0.734