R version 2.7.0 (2008-04-22) 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(1025.5 + ,691.2 + ,971.6 + ,926 + ,997.1 + ,964.9 + ,860 + ,948 + ,951.4 + ,827.3 + ,994 + ,944.5 + ,976.2 + ,668.8 + ,939.9 + ,1096.1 + ,977.7 + ,1096.9 + ,1060.8 + ,1121.4 + ,1190.9 + ,1177.9 + ,1108.1 + ,1045.6 + ,1263.9 + ,911 + ,1175.9 + ,1091.3 + ,1027.7 + ,1081.7 + ,879.7 + ,955.5 + ,1037.9 + ,959.9 + ,931.8 + ,1062.2 + ,1077.2 + ,668.4 + ,954.3 + ,797.2 + ,829.2 + ,957.3 + ,844.2 + ,893.6 + ,1132 + ,898.8 + ,1064 + ,1279.7 + ,1382.5 + ,824.1 + ,1304.1 + ,1253.5 + ,1136.3 + ,1414.7 + ,1293.2 + ,1325.7 + ,1463.8 + ,1244.2 + ,1573.6 + ,1327.3 + ,1418.5 + ,1042.2 + ,1384.8 + ,1474.8 + ,1556.5 + ,1466.2 + ,1221.7 + ,1279.7 + ,1348.4 + ,1189.8 + ,1296.6 + ,1417.6 + ,1513.9 + ,1006.1 + ,1202.8 + ,1258.8 + ,1211.5 + ,1283.3 + ,1332.3 + ,1374.3 + ,1406.1 + ,1419.1 + ,1554.4 + ,1499.8 + ,1609.6 + ,1033.9 + ,1550.5 + ,1491.4 + ,1368.9 + ,1537.1 + ,1492.3 + ,1504.1 + ,1301.2 + ,1344.2 + ,1319.1 + ,1420.3 + ,1582.9 + ,1002.6 + ,1559.1 + ,1462.7 + ,1414.8 + ,1537.5 + ,1455.9 + ,1619.9 + ,1667.2 + ,1488.9 + ,1442.5 + ,1779.6 + ,1801.9 + ,1233.4 + ,1581.1 + ,1515 + ,1439.2 + ,1585.8 + ,1488.8 + ,1601.3 + ,1646.8 + ,1630.2 + ,1720.7 + ,2013.5 + ,2051.2 + ,1404.7 + ,2015.9 + ,1544.1 + ,1816.6 + ,1773.4 + ,1577.4 + ,1709.8 + ,1810.2 + ,1520.5 + ,1798.6 + ,1666.8 + ,1730.4 + ,1147.8 + ,1777 + ,1700 + ,1907.4 + ,1745.8 + ,1771.6 + ,1790.2 + ,1958.7 + ,1560.4 + ,1752.1 + ,2011.6 + ,2082.8 + ,1616.4 + ,1846.1 + ,1824.9 + ,1711.3 + ,1805 + ,1737.6 + ,1939.6 + ,1711.4 + ,1964.8 + ,1864.4 + ,1980.7 + ,2226.7 + ,1433.3 + ,1960.7) > par5 = '12' > par4 = '0' > par3 = '0' > 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/rcomp/tmp/17xre1229939365.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/23jj21229939365.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.747823162 0.779819140 0.765861940 0.736371238 [6] 0.716379573 0.684520627 0.674496289 0.658206690 0.641294163 [11] 0.593747301 0.546338032 0.685504397 0.503995872 0.529117881 [16] 0.529414904 0.517565941 0.504408328 0.489289017 0.477015001 [21] 0.467876875 0.460182120 0.423002278 0.387297940 0.524194123 [26] 0.371344519 0.417846974 0.410885581 0.408367432 0.399854027 [31] 0.369813913 0.385417286 0.364846317 0.356136903 0.322358017 [36] 0.278990479 0.413801909 0.248635539 0.263262898 0.235602966 [41] 0.212547012 0.170646115 0.139066589 0.140081288 0.108313077 [46] 0.104024245 0.066411644 0.035570541 0.145148122 0.022713385 [51] 0.037021706 0.028952691 0.024684696 0.013458780 0.010348568 [56] 0.014236378 -0.004558614 0.003913759 -0.033393406 -0.058601987 [61] 0.051790964 > (mypacf <- c(rpacf$acf)) [1] 0.747823162 0.500452399 0.303575348 0.125943938 0.044311155 [6] -0.025949806 0.012901018 0.032925239 0.029567141 -0.091787996 [11] -0.173422332 0.469205567 -0.281361726 -0.146668759 0.079374230 [16] 0.118523249 0.015704595 0.027981385 -0.029709999 -0.050861701 [21] -0.004701306 0.039621106 -0.051740042 0.205662608 -0.075928840 [26] 0.019990248 -0.020754521 0.020131818 0.003435752 -0.104244575 [31] 0.087772506 -0.040333857 -0.093988907 0.002260860 -0.050650118 [36] 0.170148231 -0.136832673 -0.207198067 -0.099588131 -0.046020640 [41] -0.101277978 -0.002216372 0.029376451 -0.041290299 0.052092212 [46] 0.092929374 0.060139498 -0.005534240 0.062097716 -0.043549428 [51] -0.054032959 -0.047140219 0.065748875 0.059463687 -0.060289781 [56] -0.004623973 0.005926424 -0.025271216 0.024207709 0.034750585 > 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/3py2l1229939365.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/4oada1229939365.tab") > > system("convert tmp/17xre1229939365.ps tmp/17xre1229939365.png") > system("convert tmp/23jj21229939365.ps tmp/23jj21229939365.png") > > > proc.time() user system elapsed 1.568 0.563 1.661