R version 2.9.0 (2009-04-17) Copyright (C) 2009 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.61,107.86,108.07,109.68,108.57,108.08,109.8,110.7,110.72,109.85,109.71,110,110.87,111.16,110.63,110.26,110.79,111.75,111.75,112.31,112.29,111.86,111.22,112.42,111.94,112.77,113.99,114.22,112.38,114.98,115.94,117.63,117.76,118.11,120.88,121.87,122.34,122.42,122.17,121.99,124.96,125.94,126.59,127.11,125.44,125.53,125.35,124.3,123.62,124,124.47,126.89,124.87,124.55,125.31,126.02,125.31,125.3,123.83,124.49,124.92,125.77,127.27,127.35,126.05,126.84,127.75,126.78,126.98,127.89,127.9,128.06,125.39,128.13,127.97,127.56,126.89,127.8,128.05,128.98,128.55,129.35,129.97,130.89,129.8,132.32,131.1,131.44,132.55,133.35,132.53,131.11,130.02,128.91,129.98,130.91) > par5 = '12' > par4 = '0' > 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/1tz9x1249293042.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/215201249293042.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.113734846 -0.075418957 -0.099964941 0.077990847 [6] 0.025556604 0.132636463 -0.165001828 0.077186214 -0.011965462 [11] -0.037125554 0.124354179 0.008615807 -0.253800733 0.081802979 [16] -0.060084700 0.002495473 0.011202462 -0.158772992 0.049206291 [21] 0.179000490 -0.217537506 0.037091637 0.010735569 0.033362375 [26] -0.070827843 0.048126188 -0.154005295 0.283134983 -0.112947937 [31] -0.041958053 -0.040584315 -0.010903723 0.011673879 0.159654750 [36] -0.049205322 -0.037018258 0.007668442 -0.071592348 0.150806405 [41] 0.019948528 -0.217222060 -0.009723924 0.062734943 0.117204869 [46] 0.007061132 -0.096998631 0.009659213 0.181550351 > (mypacf <- c(rpacf$acf)) [1] -0.1137348460 -0.0895124713 -0.1220349599 0.0443103679 0.0227918897 [6] 0.1437831362 -0.1182186018 0.0738801125 0.0003994171 -0.0737931566 [11] 0.1459788160 0.0057748434 -0.2260761850 0.0382909779 -0.0944660100 [16] -0.0611419529 -0.0002339714 -0.1556066687 0.0747752419 0.1212655684 [21] -0.1775493232 0.0564366155 -0.0044776795 0.0737661822 -0.1043556014 [26] 0.0029884490 -0.0708394989 0.1656877003 -0.0394893102 -0.0807057362 [31] -0.1051332545 -0.0074740525 0.0660465256 0.0080229494 0.0863851967 [36] -0.0659926499 0.0668166251 -0.0658141057 0.0347920947 -0.0042153443 [41] -0.0930956526 -0.0708062102 -0.0052685578 0.1206863222 -0.0458904812 [46] 0.0038861508 0.0877406706 0.0886510028 > 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/3r82f1249293042.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/4387n1249293043.tab") > > system("convert tmp/1tz9x1249293042.ps tmp/1tz9x1249293042.png") > system("convert tmp/215201249293042.ps tmp/215201249293042.png") > > > proc.time() user system elapsed 0.569 0.311 0.697