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(103.1,103.1,103.3,103.5,103.3,103.5,103.8,103.9,103.9,104.2,104.6,104.9,105.2,105.2,105.6,105.6,106.2,106.3,106.4,106.9,107.2,107.3,107.3,107.4,107.55,107.87,108.37,108.38,107.92,108.03,108.14,108.3,108.64,108.66,109.04,109.03,109.03,109.54,109.75,109.83,109.65,109.82,109.95,110.12,110.15,110.2,109.99,110.14,110.14,110.81,110.97,110.99,109.73,109.81,110.02,110.18,110.21,110.25,110.36,110.51,110.64,110.95,111.18,111.19,111.69,111.7,111.83,111.77,111.73,112.01,111.86,112.04) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '2.0' > 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/18soy1196431582.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/2swv41196431582.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.004583777 -0.074280284 -0.234656541 0.034097977 [6] 0.118010162 0.118231899 0.072288497 -0.010029723 -0.188507223 [11] -0.014245234 0.065734653 0.023579978 0.071380373 -0.101960766 [16] -0.002800749 0.044284180 0.037211416 0.036247058 -0.061563696 [21] -0.043957580 -0.112907795 -0.022541549 0.100741086 0.220489830 [26] 0.027572551 -0.166995765 -0.010715580 -0.001695784 0.008814179 [31] 0.032350899 -0.014222183 -0.035491043 -0.141678863 -0.051785910 [36] 0.071218331 -0.219668883 0.031234987 -0.039528614 0.090108766 [41] -0.016201987 -0.099154132 -0.055896940 -0.022636660 0.043707907 [46] 0.022885933 -0.056403507 -0.024725412 0.110947976 > (mypacf <- c(rpacf$acf)) [1] 0.004583777 -0.074302856 -0.235253903 0.028524896 0.089443172 [6] 0.074154319 0.109584326 0.054731548 -0.154897582 0.001166893 [11] 0.030265445 -0.086938256 0.080014333 -0.061853850 0.009649686 [16] 0.105968237 0.004926622 0.009322826 -0.024330698 -0.042271470 [21] -0.149944217 -0.043324106 0.041874003 0.203802450 0.121139666 [26] -0.091295110 0.130659437 -0.043886418 -0.163246663 -0.023133182 [31] -0.102012372 -0.054644553 -0.048491184 -0.025462562 0.045065668 [36] -0.254639413 0.034047295 -0.035297466 0.022462694 -0.041928496 [41] -0.090543486 -0.017613804 -0.039507849 0.109167812 -0.036693995 [46] 0.002622934 -0.014141971 0.069215042 > 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/3ew9c1196431582.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/43crt1196431582.tab") > > system("convert tmp/18soy1196431582.ps tmp/18soy1196431582.png") > system("convert tmp/2swv41196431582.ps tmp/2swv41196431582.png") > > > proc.time() user system elapsed 0.862 0.316 0.975