R version 2.8.0 (2008-10-20) 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(1384.2,1368.9,-275.1,-408.9,-37.5,171.5,671.8,-18.5,231.6,747.5,1505.7,-83.6,1173.2,1452.1,777,-52.8,861.2,735.2,1073.6,966.9,1189.8,1093.5,1782.7,-70.4,1471.6,1273.8,900.8,-910.2,299.8,460.2,677.2,937.1,1265.4,1275.6,1582.6,-154.2,1667.6,1083.1,891.7,-26.5,423.4,662.8,711.4,993.3,1133.2,343.9,1415.8,-531.8,1193.6,1201.3,805.6,-164.8,327.3,223.7,675.8,949.7,704.4,265.6,1206,-558.2,1066.8,977.8,207.1,-980.7,-586.4,-24.3,-417.5,104.7,749.5,842.3,1176,-730.3,911.6,662.1,539.1,-236,286.9,497.4,912,519.4,260.1,945.2,412.7,-54.2,592.8,179.9,-548.6,-1685.8,-2041,-1048.7,-1708.4,-1550.7,-1650.2,-911.3) > par5 = '12' > par4 = '0' > 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/html/rcomp/tmp/1hqbx1229963409.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/2rhkt1229963409.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.480155956 0.396679938 0.290999905 0.356318822 [6] 0.159681908 0.104984457 0.012085793 0.124661251 0.003358419 [11] 0.020656350 -0.007299163 0.369470957 0.018827949 0.003857162 [16] -0.036615973 0.104328010 -0.019794952 -0.001821289 -0.014210560 [21] 0.106867845 0.038103603 0.061379910 0.062434947 0.399027043 [26] 0.124122482 0.107351470 0.026591950 0.099858790 -0.008100771 [31] -0.030131439 -0.073491361 0.003497887 -0.047835313 -0.049833528 [36] -0.045006105 0.197844059 -0.018250155 -0.050055857 -0.072294374 [41] -0.003226228 -0.104399271 -0.117006788 -0.114035880 -0.065605132 [46] -0.083431736 -0.120706888 -0.119334595 0.075021109 -0.075788237 [51] -0.109248337 -0.124787320 -0.073201967 -0.142718711 -0.175485498 [56] -0.147272871 -0.105106288 -0.108636975 -0.122012077 -0.067716436 [61] 0.065896806 > (mypacf <- c(rpacf$acf)) [1] 0.480155956 0.215907649 0.051781399 0.201251515 -0.143070852 [6] -0.061892349 -0.078303338 0.129492555 -0.065564017 0.020022018 [11] 0.018853517 0.482716858 -0.452460054 -0.068732217 0.013881952 [16] 0.025001415 -0.007990746 0.098737943 0.145734684 -0.068737271 [21] 0.031505902 0.009259002 0.122517647 0.103431856 -0.074434882 [26] -0.006475263 -0.111157840 -0.148412688 0.073937485 0.014689482 [31] 0.001908900 0.017907782 0.060932110 -0.044044622 0.016820608 [36] -0.060656293 -0.036484603 -0.096286931 0.085638483 -0.007219929 [41] -0.106004262 -0.006106946 0.049279927 -0.071337153 -0.020754491 [46] -0.013409506 -0.055094688 -0.053480623 -0.012667515 0.016264219 [51] -0.067657778 -0.022200306 0.025845067 -0.048307194 -0.032886880 [56] 0.043311402 -0.015367162 0.016172615 0.061756013 -0.056972245 > 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/3n5zo1229963409.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/46kws1229963409.tab") > > system("convert tmp/1hqbx1229963409.ps tmp/1hqbx1229963409.png") > system("convert tmp/2rhkt1229963409.ps tmp/2rhkt1229963409.png") > > > proc.time() user system elapsed 0.603 0.335 3.312