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(147768,137507,136919,136151,133001,125554,119647,114158,116193,152803,161761,160942,149470,139208,134588,130322,126611,122401,117352,112135,112879,148729,157230,157221,146681,136524,132111,125326,122716,116615,113719,110737,112093,143565,149946,149147,134339,122683,115614,116566,111272,104609,101802,94542,93051,124129,130374,123946,114971,105531,104919,104782,101281,94545,93248,84031,87486,115867,120327,117008,108811) > par5 = '12' > par4 = '1' > 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/17gjg1229350725.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/2keve1229350725.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.0772115509 0.0918251833 -0.1389096595 0.0450021000 [6] -0.2188262944 0.0134141245 0.0623071768 -0.0365071303 0.1008538406 [11] -0.0351181406 0.3030794423 -0.2726306248 -0.0164734499 0.0020612516 [16] -0.0571944276 -0.2698540260 0.0155621271 0.0066294277 -0.0695546842 [21] 0.1094458782 -0.0089738493 0.1544646449 -0.1162700431 0.0123342537 [26] -0.0439359904 0.0021612947 -0.0682152785 0.0589243534 0.0395782518 [31] -0.0123368748 0.0913837876 0.0620840205 0.0603899679 -0.1087655591 [36] -0.0542170271 -0.0562060029 0.0210775969 -0.0292994504 0.0130518636 [41] -0.0328697029 -0.0280082306 0.0029778182 0.0474864058 -0.0143669905 [46] -0.0425225240 -0.0082331396 0.0004058405 > (mypacf <- c(rpacf$acf)) [1] -0.0772115509 0.0863785159 -0.1274680130 0.0203840103 -0.1984835918 [6] -0.0343896895 0.1038823593 -0.0851070319 0.1016908328 -0.0451021556 [11] 0.2913810167 -0.2247401344 -0.1083904786 0.1727813046 -0.1924906326 [16] -0.2030592028 -0.0662994137 -0.0576596677 -0.0368720451 -0.0164837457 [21] -0.0381914492 0.1091646663 0.0434413788 -0.0672987310 -0.0227690332 [26] 0.0986312616 0.0726200876 -0.1452288411 0.0001736972 0.0921669910 [31] -0.0662693472 0.0561477119 -0.0269501909 -0.0739290406 -0.0325729749 [36] -0.0855907646 0.0334162626 0.0370483401 -0.0521772389 -0.1317115045 [41] -0.0309859477 0.0563448638 0.0163138787 -0.0664389512 0.0524851346 [46] 0.0223249400 -0.0198195341 > 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/3qd631229350725.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/4ccru1229350725.tab") > > system("convert tmp/17gjg1229350725.ps tmp/17gjg1229350725.png") > system("convert tmp/2keve1229350725.ps tmp/2keve1229350725.png") > > > proc.time() user system elapsed 0.580 0.307 0.711