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(106.6,106.8,107,107.1,107.3,107.4,107.6,107.7,107.9,108.2,108.3,108.5,108.92,109.23,109.41,109.65,109.91,110.01,110.2,110.49,110.57,110.72,110.94,111.09,111.28,111.41,111.62,111.76,111.89,112.04,112.12,112.3,112.47,112.59,112.78,112.73,112.99,113.1,113.33,113.38,113.68,113.65,113.81,113.88,114.02,114.25,114.28,114.38,114.73,114.97,115.05,115.29,115.37,115.54,115.76,115.92,116.02,116.21,116.26,116.51) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > #'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/freestat/rcomp/tmp/1lust1228761297.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/freestat/rcomp/tmp/20s4n1228761297.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.213700427 0.090669150 0.132297155 0.154405914 [6] -0.106231755 0.171622757 -0.032877637 -0.012468513 -0.020103367 [11] -0.014235987 0.135941031 0.022951567 -0.060195643 0.013357426 [16] 0.064462414 -0.166370941 0.100758418 -0.099181793 -0.041972536 [21] -0.102599583 0.027853322 -0.088379864 -0.015054425 -0.062122329 [26] 0.031048626 -0.055858269 -0.031552883 -0.061374045 -0.054622702 [31] -0.015760398 -0.141296051 0.047570426 -0.029297999 -0.106356115 [36] -0.017661878 0.216855734 -0.068851552 -0.012731123 0.033335661 [41] -0.007593829 -0.015520808 0.004345798 -0.035627648 -0.045758841 [46] -0.016365932 -0.053835451 0.056187689 0.011692000 -0.031525169 [51] 0.011051293 0.021099472 -0.024075312 0.038908152 -0.029735254 [56] 0.020535092 -0.019358684 -0.002576459 0.005882106 > (mypacf <- c(rpacf$acf)) [1] -0.213700427 0.047154734 0.168908632 0.228205887 -0.053441597 [6] 0.085498563 -0.028006958 -0.057110842 -0.056218521 -0.076412719 [11] 0.185979225 0.126596904 -0.032279473 -0.075219003 -0.021006483 [16] -0.155589204 0.013406032 -0.079850238 -0.013301615 -0.043625490 [21] -0.008590681 -0.018508142 -0.064226466 -0.031802910 0.044328018 [26] -0.001096571 -0.008013525 -0.087811913 -0.108468248 0.011907692 [31] -0.113806051 0.034898334 0.078017807 -0.070775585 -0.013575818 [36] 0.180795296 0.089542811 -0.048138751 -0.094789615 -0.083886496 [41] 0.011984219 -0.040339877 -0.037587470 -0.065172099 0.022874787 [46] -0.007113462 -0.083420722 -0.001354703 -0.008651525 -0.009054406 [51] -0.007634004 -0.002815706 -0.009314935 -0.021288987 0.048537436 [56] 0.027906462 -0.021730291 -0.012641028 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3avxa1228761297.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/freestat/rcomp/tmp/4ovcc1228761297.tab") > > system("convert tmp/1lust1228761297.ps tmp/1lust1228761297.png") > system("convert tmp/20s4n1228761297.ps tmp/20s4n1228761297.png") > > > proc.time() user system elapsed 0.830 0.439 1.939