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(831581,808744,899237,929532,883165,908232,955613,937590,849396,978630,868513,1156102,1505713,1415151,1545021,1681193,1457973,1638575,1688972,1563924,1596359,1722061,1549332,2264959,1420268,1415099,1597279,1605693,1575400,1654752,1553966,1570959,1642414,1664774,1551560,2304365,1644081,1425600,1569344,1456489,1610786,1601519,1496600,1486452,1637939,1605759,1504221,1993384,1507620,1477037,1679184,1504731,1570141,1734191,1657498,1652164,1610941,1813765,1711573,2165466,1492778,1385488,1470589,1514657,1641395,1606185,1581162,1517847,1630080,1604623,1548973,2125558) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > 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/16fw01244279217.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/2z7lx1244279217.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.439556873 -0.049637957 0.155326964 -0.167000023 [6] -0.002580109 0.193215150 -0.131998216 -0.063278093 0.188607993 [11] -0.112841529 -0.322256862 0.605353413 -0.379044505 0.043743770 [16] 0.116221978 -0.180968474 0.045591352 0.133605072 -0.091677048 [21] -0.039407382 0.117413990 -0.094582824 -0.146951200 0.431111979 [26] -0.319072391 0.025089617 0.055900285 -0.092143147 0.034111911 [31] 0.059679470 -0.072688858 0.033738613 0.039958406 -0.083466916 [36] -0.133679261 0.296924060 -0.186138288 0.060067575 -0.018486749 [41] -0.047446702 0.052660309 0.026497513 -0.059274962 0.011670467 [46] 0.058219769 -0.042933957 -0.067361771 0.074434825 > (mypacf <- c(rpacf$acf)) [1] -0.439556873 -0.301005560 -0.007316915 -0.131120683 -0.148014899 [6] 0.109127105 0.043558022 -0.099183758 0.085849486 0.065762729 [11] -0.450471075 0.325859833 -0.026601672 -0.037094951 -0.071028364 [16] 0.003776069 -0.018618480 -0.069450242 0.109935554 0.016653989 [21] -0.096943976 -0.048679226 0.074933276 0.119670808 0.006995815 [26] -0.085257520 -0.110988578 0.032330814 -0.042763370 -0.065593504 [31] -0.039101350 0.090071525 -0.057946039 -0.039103742 -0.060673417 [36] -0.056935113 -0.030779479 0.040451203 -0.011938440 -0.050834877 [41] 0.011831208 0.001705688 -0.030165266 -0.070351270 0.062940806 [46] -0.021015157 0.016115810 -0.203536789 > 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/3bm991244279217.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/4minp1244279217.tab") > > system("convert tmp/16fw01244279217.ps tmp/16fw01244279217.png") > system("convert tmp/2z7lx1244279217.ps tmp/2z7lx1244279217.png") > > > proc.time() user system elapsed 0.566 0.321 1.051