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(15044.5,14944.2,16754.8,14254,15454.9,15644.8,14568.3,12520.2,14803,15873.2,14755.3,12875.1,14291.1,14205.3,15859.4,15258.9,15498.6,15106.5,15023.6,12083,15761.3,16943,15070.3,13659.6,14768.9,14725.1,15998.1,15370.6,14956.9,15469.7,15101.8,11703.7,16283.6,16726.5,14968.9,14861,14583.3,15305.8,17903.9,16379.4,15420.3,17870.5,15912.8,13866.5,17823.2,17872,17420.4,16704.4,15991.2,16583.6,19123.5,17838.7,17209.4,18586.5,16258.1,15141.6,19202.1,17746.5,19090.1,18040.3,17515.5,17751.8,21072.4,17170,19439.5,19795.4,17574.9,16165.4,19464.6,19932.1,19961.2,17343.4,18924.2,18574.1,21350.6,18594.6,19823.1,20844.4,19640.2,17735.4,19813.6,22160,20664.3,17877.4,21211.2,21423.1,21688.7,23243.2,21490.2,22925.8,23184.8,18562.2) > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '0.4' > 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/1wh101229428295.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/212p01229428295.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.191676313 0.311279333 0.498992665 0.148740812 [6] 0.237187992 0.317594647 -0.039342232 0.117889074 0.205495512 [11] -0.030801729 0.027073664 0.103317764 -0.052396767 0.078252403 [16] 0.063505808 -0.129813870 0.113254666 0.063230724 -0.071482265 [21] 0.069965800 0.059420477 -0.150327808 0.191614704 -0.180588524 [26] -0.098705778 0.049037052 -0.146582667 -0.112840673 -0.032701482 [31] -0.192660863 -0.083872200 -0.020967267 -0.204904009 -0.070541888 [36] 0.038711946 -0.082614263 0.057048526 0.077352875 -0.016826025 [41] 0.132150239 0.122092720 0.010851179 0.109121087 0.162828355 [46] -0.061845048 0.126172403 -0.009803513 -0.104337048 0.105098171 [51] -0.083687431 -0.088809923 -0.006656743 -0.137641260 -0.083312789 [56] -0.029973411 -0.154805390 -0.084360392 -0.028930643 -0.124037497 [61] -0.077924438 > (mypacf <- c(rpacf$acf)) [1] 0.191676313 0.285010765 0.453894909 -0.016291933 -0.023129909 [6] 0.084167856 -0.221399921 -0.090730082 0.133282661 0.057441743 [11] -0.096898656 0.007805303 0.028528776 0.050175522 -0.007297001 [16] -0.124374384 0.106090644 0.067563938 -0.040426902 -0.041172391 [21] 0.092422812 -0.179386928 0.116227195 -0.250314782 0.036895266 [26] -0.014972173 0.004634876 -0.007743107 -0.048608840 -0.014372134 [31] -0.030914608 0.033530710 -0.067389510 0.068030047 0.082970124 [36] 0.099996182 0.091257845 0.006297192 0.045619599 -0.080939998 [41] 0.046415168 -0.019794586 0.044928125 0.037782895 -0.056649730 [46] -0.087636435 -0.045891821 -0.135002925 0.055728411 -0.022587608 [51] 0.058887119 -0.076822638 -0.107099751 -0.016450629 -0.043023571 [56] -0.023618963 -0.042592864 0.002975088 0.021749405 -0.028700727 > 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/33hu51229428295.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/4m3d31229428295.tab") > > system("convert tmp/1wh101229428295.ps tmp/1wh101229428295.png") > system("convert tmp/212p01229428295.ps tmp/212p01229428295.png") > > > proc.time() user system elapsed 0.586 0.305 0.761