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(1091075,1514814,1748997,2424406,2747942,2377332,5210706,3882821,2197469,2271155,1618917,1391579,1143249,1445785,1870242,2597788,2436231,2684184,4705109,4331347,2369192,2283947,1749607,1598601,1221234,1497778,1823567,2489908,2532837,2456065,4627018,4276894,2314950,2238987,1652753,1561968,1115878,1596714,1910242,2286450,2772441,2394538,4715128,4402420,2325392,2306683,1725282,1541370,1168142,1457835,1816380,2446552,2575774,2537852,4728097,4372685,2302672,2346402,1689915,1576183) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/14c361228848429.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/29cky1228848429.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.753732015 0.326045823 -0.008365844 -0.146744935 [6] 0.150078466 -0.032845732 -0.096447031 0.073587622 0.041012375 [11] -0.134290549 0.169312189 -0.174256164 0.123490810 -0.032682038 [16] -0.027895967 0.035711994 -0.060907188 0.112139651 -0.091983865 [21] -0.017806492 0.168115542 -0.285465749 0.319426392 -0.214081225 [26] 0.048870877 0.059087083 -0.085247450 0.036347874 0.047572075 [31] -0.122353789 0.101746023 0.019844250 -0.155338942 0.239884343 [36] -0.229076661 0.139719753 > (mypacf <- c(rpacf$acf)) [1] -0.75373202 -0.56048351 -0.15978163 -0.11691739 -0.11652332 0.10587759 [7] 0.02264440 -0.27228950 -0.11562133 -0.08293145 -0.01971739 -0.13801560 [13] -0.10684134 -0.07169530 -0.08744568 -0.08239008 -0.23003893 -0.09319232 [19] 0.04850839 -0.22722539 0.07426097 -0.12073596 -0.08733634 0.02002365 [25] 0.08267371 0.02099090 -0.07309927 -0.07027616 0.00936599 -0.07744171 [31] -0.07592052 0.04498778 -0.02324870 0.05884038 0.08460170 0.07659225 > 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/3naxe1228848429.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/42ey31228848429.tab") > system("convert tmp/14c361228848429.ps tmp/14c361228848429.png") > system("convert tmp/29cky1228848429.ps tmp/29cky1228848429.png") > > > proc.time() user system elapsed 0.553 0.312 0.644