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(106.8,113.7,102.5,96.6,92.1,95.6,102.3,98.6,98.2,104.5,84,73.8,103.9,106,97.2,102.6,89,93.8,116.7,106.8,98.5,118.7,90,91.9,113.3,113.1,104.1,108.7,96.7,101,116.9,105.8,99,129.4,83,88.9,115.9,104.2,113.4,112.2,100.8,107.3,126.6,102.9,117.9,128.8,87.5,93.8,122.7,126.2,124.6,116.7,115.2,111.1,129.9,113.3,118.5,133.5,102.1,102.4) > par5 = '12' > par4 = '1' > 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/178551196433691.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/20lxu1196433691.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.0938186001 0.1740140568 0.3042524263 -0.0176482499 [6] 0.0788101090 0.0762137511 -0.2413647877 0.0105116577 -0.1180872392 [11] -0.1685496031 -0.0507637298 -0.2861695016 -0.2185805521 -0.1034565562 [16] -0.1262163350 -0.0995694520 0.0503227915 -0.0332696787 0.0203561565 [21] 0.0842401047 0.1307090723 0.0206111518 0.1691426921 -0.0108161298 [26] 0.0629258854 0.1721267398 -0.0060156265 -0.0183722926 0.0749026270 [31] -0.0122222649 0.0893523163 -0.0429472127 -0.0622545792 0.0590044598 [36] -0.0862308978 -0.1271748928 -0.0216244258 -0.0949956473 -0.0457593976 [41] 0.0460368529 -0.0235829456 -0.0468061226 0.0002786158 -0.0232736095 [46] -0.0671724850 -0.0525843326 -0.0121215194 > (mypacf <- c(rpacf$acf)) [1] 0.0938186001 0.1666792259 0.2853807783 -0.0890879344 -0.0111769574 [6] 0.0033681980 -0.2555626905 0.0032171552 -0.0732648165 -0.0238107990 [11] -0.0348155745 -0.2188081704 -0.1407831810 -0.0764842796 0.0845911089 [16] -0.0277939776 0.1081771551 0.0091199970 -0.0872019348 -0.0260242148 [21] 0.1019068247 -0.0422169491 0.0837615811 -0.1293103784 -0.0553270554 [26] 0.0687072599 0.0004985245 -0.0548893398 0.0294630872 0.1148200529 [31] 0.0741350518 -0.0976016789 0.0287692802 0.0500365769 -0.0186437849 [36] -0.1589567812 -0.0415981562 0.0488829742 0.0489061799 0.0383940944 [41] 0.0508853248 -0.0708032012 -0.0431264448 -0.0595025511 -0.0332279084 [46] -0.0511174932 0.0362712748 > 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/3p8ge1196433691.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/4n6y71196433691.tab") > > system("convert tmp/178551196433691.ps tmp/178551196433691.png") > system("convert tmp/20lxu1196433691.ps tmp/20lxu1196433691.png") > > > proc.time() user system elapsed 0.913 0.340 1.056