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(104708,101817,97898,95559,92822,90848,101141,105841,93647,90923,89130,90212,93196,91861,90593,89895,88819,87924,96906,101217,98709,98139,95529,98577,100772,100180,99200,96251,94514,93780,105192,107682,99687,99436,102049,102673,105813,105056,103916,103513,101893,102503,113149,116696,108500,107800,105941,108742,111680,111270,110698,108517,107127,107088,116321,125045,116779,122887,120162,123198,123610,122293,121289,119393,117494,116693,125062,127281,120195,119804,117113,119240,115823,116281,113816,114632,112987,111633,116721,114850,112797,105368,102524,101327,102612,98873,95993,93244,90403,88539,98106,96963,90781,89253,87794,89810,90864,89025,87621,87718,83433,84535,92223,91052,88456,88706,89137,94066,99258,100673,102269,100833,99314,101764,108242,108148,104761,103772,103737,111043,109906,109335,107247,105690,102755,102280,110590,109122,102803,101424,99138) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/19jqm1292959465.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/29jqm1292959465.ps",horizontal=F,onefile=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.00000000 0.92697523 0.84585923 0.80902391 0.79993847 0.80403963 [7] 0.78339913 0.72513936 0.64260674 0.57583345 0.53178513 0.53600665 [13] 0.52817458 0.42301596 0.31267188 0.24221967 0.20196708 0.17740597 [19] 0.13638904 0.06424663 -0.02239869 -0.09042616 -0.13426049 -0.12672721 [25] -0.13454058 -0.22541272 -0.31535036 -0.35452912 -0.36910658 -0.36633511 [31] -0.37838872 -0.41200633 -0.45296798 -0.47667519 -0.47899971 -0.43524519 [37] -0.40746924 -0.45420125 -0.49912326 -0.50470580 -0.48823155 -0.45433555 [43] -0.43865636 -0.44423329 -0.45938806 -0.46215241 -0.44345612 -0.38778705 [49] -0.34347175 > (mypacf <- c(rpacf$acf)) [1] 0.9269752284 -0.0953960707 0.2765705645 0.1472978994 0.1756052450 [6] -0.0870524193 -0.1815935417 -0.2671320173 -0.1065495312 -0.1146983723 [11] 0.3271295867 0.0016645819 -0.5381781064 -0.0276236264 -0.0061974318 [16] -0.0453141138 0.0034035521 -0.0118658200 0.0034603501 0.0009931936 [21] 0.0240614635 -0.0100302610 0.0945525399 -0.0650051503 -0.2323643580 [26] -0.0135672286 0.1624472035 -0.1179217583 0.0533209951 -0.0200179297 [31] 0.1250722965 0.0101369384 0.0319070377 -0.0718797638 0.0129789533 [36] -0.0632126347 -0.0958569290 -0.0843805547 -0.0882433019 -0.0833862033 [41] 0.0488817192 -0.0563754314 0.0432283583 -0.0647110324 -0.0061798629 [46] 0.0027935352 -0.0571562410 0.0700838267 > 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/3u1ps1292959465.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/4g2ny1292959465.tab") > > try(system("convert tmp/19jqm1292959465.ps tmp/19jqm1292959465.png",intern=TRUE)) character(0) > try(system("convert tmp/29jqm1292959465.ps tmp/29jqm1292959465.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.581 0.349 1.366