R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(36845,35338,35022,34777,26887,23970,22780,17351,21382,24561,17409,11514,31514,27071,29462,26105,22397,23843,21705,18089,20764,25316,17704,15548,28029,29383,36438,32034,22679,24319,18004,17537,20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698,31956,29506,34506,27165,26736,23691,18157,17328,18205,20995,17382,9367) > 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/1t29a1198170732.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/2ug4g1198170732.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.0000000000 0.4630851331 0.2261799223 0.0463382460 -0.1345374414 [6] -0.2187903518 -0.3590849968 -0.2728179689 -0.2311029277 -0.1056380402 [11] -0.0249231764 0.1707197868 0.6046310984 0.2560434918 0.1211193284 [16] -0.0091925121 -0.1292018828 -0.1643855612 -0.2882726125 -0.2157166468 [21] -0.1902059220 -0.0871808298 0.0281486697 0.2168860531 0.5263343764 [26] 0.2816839499 0.1449154196 0.0337337910 -0.0840355925 -0.1475930978 [31] -0.2422061861 -0.1738111171 -0.1723781917 -0.1262967045 -0.0386989775 [36] 0.0738485297 0.3124718919 0.1447284194 0.0612400481 -0.0007853743 [41] -0.0292728378 -0.1104531264 -0.1685684934 -0.1369481605 -0.1275934100 [46] -0.0754078604 -0.0201913550 0.0600982643 0.2458189279 0.1620300819 [51] 0.0892715601 0.0296459886 -0.0055123793 -0.0766823743 -0.1037909382 [56] -0.1156961018 -0.1313879061 -0.1068804770 -0.0988900442 -0.0748414021 > (mypacf <- c(rpacf$acf)) [1] 0.4630851331 0.0149348222 -0.0811764675 -0.1664871222 -0.1102691340 [6] -0.2406536147 -0.0061264318 -0.0959749014 0.0159013410 -0.0555154298 [11] 0.1709762026 0.5543447575 -0.4483084518 -0.1122638024 -0.0228011794 [16] -0.0091026906 0.0244377997 -0.0210812111 -0.0179526280 -0.0289808676 [21] 0.0147962039 0.2420195496 0.0935538764 -0.0890466805 0.0072272150 [26] -0.0776477014 0.0848827546 0.0182418442 -0.0795123746 0.0680772260 [31] 0.0323032919 0.0192554642 -0.0035246778 -0.0909204423 -0.1556460874 [36] 0.0032740796 -0.0164953229 0.0876942472 -0.0861565855 0.1065506956 [41] -0.0867128441 0.0081121960 -0.0662100325 0.0245954760 0.0006671297 [46] -0.0801907089 -0.0148124089 0.0312783068 0.1065010960 -0.0103074471 [51] -0.0127659543 -0.1254492868 0.0683879842 0.0131026081 0.0040988809 [56] -0.1051091484 -0.1132938818 -0.0320073570 -0.0401556647 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/366xm1198170732.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4wus41198170732.tab") > > system("convert tmp/1t29a1198170732.ps tmp/1t29a1198170732.png") > system("convert tmp/2ug4g1198170732.ps tmp/2ug4g1198170732.png") > > > proc.time() user system elapsed 0.855 0.308 0.972