R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-pc-linux-gnu (32-bit) 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(1356.876334 + ,1267.205322 + ,1296.765977 + ,1088.768988 + ,974.9813884 + ,901.3596576 + ,697.4384802 + ,619.518781 + ,446.3076104 + ,279.7073872 + ,388.5496968 + ,290.3616669 + ,278.7900756 + ,433.3678289 + ,436.029714 + ,642.0796877 + ,800.8666721 + ,1005.060868 + ,986.1196671 + ,1320.620732 + ,1293.652614 + ,1315.564345 + ,1438.509653 + ,1311.68492 + ,1281.851742 + ,1229.184547 + ,1157.483378 + ,1049.930474 + ,720.8534348 + ,756.8141819 + ,587.8054359 + ,440.0632504 + ,476.8424862 + ,376.9041092 + ,408.9909215 + ,335.6074609 + ,510.7385144 + ,784.0262709 + ,868.9048671 + ,930.5891366 + ,1232.387738 + ,1433.973937 + ,1441.341759 + ,1560.894767 + ,1570.121112 + ,1539.736335 + ,1509.516021 + ,1264.261299 + ,1280.1511 + ,1104.198071 + ,867.0732077 + ,832.9038416 + ,551.1656185 + ,578.9382082 + ,548.7690841 + ,526.7505509 + ,543.7872669 + ,387.4285031 + ,583.0257696 + ,858.5103593 + ,835.2939603 + ,1234.576103 + ,1307.198241 + ,1550.368145 + ,1513.93417 + ,1607.433912 + ,1768.513076 + ,1778.655313 + ,1668.394241 + ,1383.577733 + ,1271.618447 + ,1140.579064 + ,998.7028247 + ,804.5968421 + ,743.1134557 + ,661.133487 + ,635.0605076 + ,334.5931783 + ,502.1494165 + ,450.8321675 + ,700.3681247 + ,799.3587889 + ,1068.293463 + ,1229.161035 + ,1369.983001 + ,1586.670588 + ,1649.664042 + ,1871.680788 + ,1816.035687 + ,1919.694672 + ,1817.473725 + ,1707.303794 + ,1606.456459 + ,1446.737592 + ,1005.045182 + ,913.67958 + ,694.7422417 + ,647.2193014 + ,603.2233095 + ,561.3616255 + ,477.9286605 + ,648.8516322 + ,676.4550378 + ,1016.256499 + ,1139.927185 + ,1269.321991 + ,1546.025319 + ,1753.304467 + ,1958.22963 + ,2094.065774 + ,1977.440699 + ,2027.739055 + ,1842.633768 + ,1852.639287 + ,1706.985147 + ,1471.71997 + ,1159.935346 + ,888.3265125 + ,747.4889418 + ,573.6363 + ,696.6030203 + ,736.0360216 + ,625.9859074 + ,668.0129992 + ,878.1341576 + ,925.7355157 + ,1384.068603 + ,1504.264376 + ,1677.525248 + ,1935.129054 + ,1995.385689 + ,2158.635275 + ,2278.786793 + ,2004.468115 + ,2055.40499 + ,1967.431468 + ,1770.334016 + ,1699.341376 + ,1476.810831 + ,970.7915825 + ,997.474492 + ,652.0843291 + ,708.677725 + ,656.5517255 + ,770.8461221 + ,901.3881145 + ,832.0016083 + ,1028.128263 + ,1296.071512 + ,1785.233557 + ,1804.294853 + ,2165.319782 + ,2274.425758 + ,2444.192672 + ,2254.896853 + ,2475.21364 + ,2096.602738 + ,2180.683121 + ,2069.506046 + ,1776.663609 + ,1612.449679 + ,1322.927331 + ,914.8881288 + ,749.3597793 + ,985.6467572 + ,880.7232311 + ,819.4581121 + ,760.5542696 + ,985.0475722 + ,1295.758114 + ,1683.545809 + ,1787.214405 + ,1972.790239 + ,2134.412385 + ,2263.189757 + ,2432.266646 + ,2369.774565 + ,2360.715385 + ,2432.992026 + ,2437.706015 + ,1921.308588 + ,1960.743986 + ,1481.140265 + ,1436.91711 + ,1299.84893 + ,985.736701 + ,805.8439046 + ,736.9963963 + ,898.3310247 + ,1065.843227 + ,1113.559476 + ,1211.918524 + ,1462.155718 + ,1801.38398 + ,2045.731198 + ,2405.387519 + ,2376.281401 + ,2542.194732 + ,2535.172687 + ,2518.76254 + ,2467.712934 + ,2483.547793 + ,2111.5245 + ,1987.469819 + ,1900.284914 + ,1545.174509 + ,1241.063215 + ,1244.17204 + ,1001.510714 + ,1004.787213 + ,1064.602774 + ,1250.752996 + ,1244.505238 + ,1565.513983 + ,1904.45973 + ,2200.393469 + ,2489.302736 + ,2382.022655 + ,2740.656964 + ,2692.201467 + ,2707.985974 + ,2793.734301 + ,2909.368555 + ,2611.616903 + ,2367.927913 + ,2036.392713 + ,1794.090508 + ,1658.074271 + ,1450.206111 + ,1159.117531 + ,1144.297116 + ,1188.107289 + ,1082.864685 + ,1152.30001 + ,1370.470201 + ,1560.414285 + ,1878.82661 + ,2213.171169 + ,2306.794427 + ,2878.274067 + ,3043.563683 + ,3163.511145 + ,3218.690493 + ,3177.601319 + ,2941.518453 + ,2922.823356 + ,2325.88093 + ,2414.009426 + ,1874.014382 + ,1866.949762 + ,1330.453111 + ,1413.735476 + ,988.2221384 + ,1046.533458 + ,1398.652585 + ,1444.958119 + ,1637.387943 + ,1926.364707 + ,2088.421239 + ,2250.892557 + ,2803.393628 + ,2920.006864 + ,3028.392467 + ,3284.085805 + ,3116.539112 + ,3120.244711 + ,2946.135624 + ,2740.67997 + ,2810.140837 + ,2233.823039 + ,2114.011418 + ,2076.542437 + ,1571.481405 + ,1567.958655 + ,1217.444043 + ,1136.643661 + ,1481.287919 + ,1528.477337 + ,1797.720002 + ,1819.469046 + ,2395.358987 + ,2707.314708 + ,2921.060577 + ,3246.433366 + ,3051.477548 + ,3444.481052 + ,3432.580153 + ,3421.04804 + ,3381.830601 + ,3169.679136 + ,2872.11508 + ,2601.76563 + ,2143.011809 + ,2159.598897 + ,1645.12941 + ,1622.54215 + ,1350.064447 + ,1372.486802 + ,1475.078831 + ,1356.08523 + ,1974.230192 + ,1835.493872 + ,2495.225532 + ,2813.660064 + ,3199.803837 + ,3128.428211 + ,3614.588977 + ,3741.816099 + ,3711.62971 + ,3501.116488 + ,3620.888016 + ,3348.935195) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '48' > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/wessaorg/rcomp/tmp/1dpew1386178817.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/288hr1386178817.ps",horizontal=F,onefile=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.955435454 0.887058418 0.779557445 0.646031924 [6] 0.495931852 0.340089449 0.191748449 0.061425247 -0.040378320 [11] -0.104798300 -0.125761669 -0.107513422 -0.046358160 0.046704084 [16] 0.168642163 0.301578048 0.445607088 0.576724639 0.691287948 [21] 0.781476518 0.834353102 0.847487853 0.821072161 0.755252915 [26] 0.656901076 0.535718089 0.396552351 0.253591162 0.118703872 [31] -0.003042144 -0.095766503 -0.154962537 -0.175141412 -0.157198470 [36] -0.103784150 -0.018654170 0.092941994 0.219285523 0.347806363 [41] 0.470641423 0.573319100 0.653948297 0.703154193 0.716307441 [46] 0.689677724 0.633496366 0.540192477 0.426448821 > (mypacf <- c(rpacf$acf)) [1] 0.955435454 -0.296047426 -0.453095789 -0.267461187 -0.092856789 [6] 0.018472092 0.121205608 0.163081044 0.187487825 0.219169171 [11] 0.249848080 0.132299268 0.172448888 0.096291770 0.128345521 [16] -0.008309481 0.144636116 -0.016703011 0.001412766 0.095662950 [21] -0.006740397 -0.067007539 -0.017309354 -0.057324605 -0.042943851 [26] 0.018708393 -0.048663451 -0.073573531 0.031608324 -0.104896359 [31] -0.013230466 0.010697165 0.051396297 -0.018080757 -0.029220336 [36] -0.004199739 0.033047994 0.031562880 -0.035793308 -0.034473115 [41] -0.068706635 0.055967007 0.060459274 0.008546637 -0.037385044 [46] 0.062542424 -0.086936045 -0.026398777 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/399c31386178817.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/wessaorg/rcomp/tmp/4ls0q1386178817.tab") > > try(system("convert tmp/1dpew1386178817.ps tmp/1dpew1386178817.png",intern=TRUE)) character(0) > try(system("convert tmp/288hr1386178817.ps tmp/288hr1386178817.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.565 1.026 4.536