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(104.3,103.9,103.9,103.9,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.0,108.2,112.3,111.3,111.3,115.3,117.2,118.3,118.3,118.3,119.0,120.6,122.6,122.6,127.4,125.9,121.5,118.8,121.6,122.3,122.7,120.8,120.1,120.1,120.1,120.1,128.4,129.8,129.8,128.6,128.6,133.7,130.0,125.9,129.4,129.4,130.6,130.6,130.6,130.8,129.7,125.8,126.0,125.6,125.4,124.7,126.9,129.1) > 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: 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/1ig4e1197816746.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/2jriw1197816746.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.950980027 0.902330594 0.867337709 0.831269614 [6] 0.800538738 0.765283725 0.736044714 0.703981353 0.655836759 [11] 0.608315123 0.571883770 0.540581714 0.498781590 0.452497781 [16] 0.421929522 0.393431588 0.349583791 0.310024700 0.274798813 [21] 0.239699135 0.195756680 0.147974535 0.115162006 0.084778206 [26] 0.043041996 -0.002385042 -0.050325759 -0.097348219 -0.135298943 [31] -0.180051244 -0.214517446 -0.239429726 -0.272036759 -0.307278018 [36] -0.335354443 -0.362751277 -0.386263923 -0.402762215 -0.410187155 [41] -0.412901879 -0.407888680 -0.406700608 -0.413328646 -0.416109712 [46] -0.413413595 -0.412562893 -0.403446256 -0.398108633 > (mypacf <- c(rpacf$acf)) [1] 0.950980027 -0.021251387 0.117300505 -0.029933991 0.056268587 [6] -0.068864385 0.063763647 -0.064904376 -0.163616044 -0.039995659 [11] 0.059660409 0.024078901 -0.123406114 -0.056086942 0.112561887 [16] 0.003142046 -0.144000954 0.022291903 -0.026651951 -0.034803923 [21] -0.101464510 -0.043435081 0.044058155 -0.023844021 -0.083348155 [26] -0.063953471 -0.126514506 -0.070859621 0.116139257 -0.117818136 [31] -0.012937719 0.046313679 -0.002541922 -0.065608291 0.016515779 [36] -0.072187830 0.038226636 0.065957940 0.047286208 0.012505741 [41] 0.109912310 -0.011142492 -0.073621529 -0.036678752 0.042850770 [46] 0.010217456 0.026877112 -0.095872788 > 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/3t2lr1197816746.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/4b0c71197816746.tab") > > system("convert tmp/1ig4e1197816746.ps tmp/1ig4e1197816746.png") > system("convert tmp/2jriw1197816746.ps tmp/2jriw1197816746.png") > > > proc.time() user system elapsed 0.835 0.307 0.959