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(1593,1477.9,1733.7,1569.7,1843.7,1950.3,1657.5,1772.1,1568.3,1809.8,1646.7,1808.5,1763.9,1625.5,1538.8,1342.4,1645.1,1619.9,1338.1,1505.5,1529.1,1511.9,1656.7,1694.4,1662.3,1588.7,1483.3,1585.6,1658.9,1584.4,1470.6,1618.7,1407.6,1473.9,1515.3,1485.4,1496.1,1493.5,1298.4,1375.3,1507.9,1455.3,1363.3,1392.8,1348.8,1880.3,1669.2,1543.6,1701.2,1516.5,1466.8,1484.1,1577.2,1684.5,1414.7,1674.5,1598.7,1739.1,1674.6,1671.8,1802,1526.8,1580.9,1634.8,1610.3,1712,1678.8,1708.1,1680.6,2056,1624,2021.4,1861.1,1750.8,1767.5,1710.3,2151.5,2047.9,1915.4,1984.7,1896.5,2170.8,2139.9,2330.5,2121.8,2226.8,1857.9,2155.9,2341.7,2290.2,2006.5,2111.9,1731.3,1762.2,1863.2,1943.5,1975.2) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '-1.0' > 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/1oqzm1229860667.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/2ogik1229860667.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.470805557 0.028955258 0.019131026 -0.141787419 [6] 0.144463568 -0.088079677 0.106807149 -0.019216166 -0.059788033 [11] -0.087747718 -0.048008250 0.358957325 -0.293162578 0.163973000 [16] -0.125558563 -0.052004208 0.063600110 0.052235572 -0.046880903 [21] 0.088023022 -0.072758005 -0.082899225 0.034288513 0.197826939 [26] -0.166618238 0.178572922 -0.257604739 0.038539441 0.166299939 [31] -0.180616270 0.075086210 0.097502521 -0.137846172 -0.008450499 [36] -0.056840723 0.229737785 -0.128851238 0.032978709 -0.108137561 [41] 0.029717024 0.063885325 -0.095306249 0.152307947 -0.003339036 [46] -0.174727505 0.137567078 -0.161221676 0.146836138 -0.017730750 [51] -0.031276062 -0.016251100 -0.015326607 0.039068370 -0.025086255 [56] 0.085443060 -0.054009425 -0.021064142 0.014766119 -0.111175637 [61] 0.219393656 > (mypacf <- c(rpacf$acf)) [1] -0.4708055572 -0.2475808625 -0.1100745062 -0.2394246714 -0.0650926949 [6] -0.0997424632 0.0442990067 0.0565004876 0.0009983134 -0.1882297147 [11] -0.2797126329 0.2432054334 -0.0091360988 0.0666246337 -0.0782420642 [16] -0.0823313970 -0.1228463688 0.1246795889 -0.1121027573 0.0255163577 [21] 0.0321518643 0.0066831932 -0.0862081452 0.1785917455 0.0274689975 [26] 0.1495181880 -0.0931516215 -0.0829135620 0.1372513255 -0.0501781443 [31] -0.1113952576 0.0005504267 0.0471021027 -0.0275770887 -0.1105351449 [36] 0.0574706982 0.0443497515 -0.0990537048 0.0095633289 -0.0971566995 [41] -0.0449459383 0.0002459736 0.0779954288 -0.0396488374 -0.0697384510 [46] 0.0752530974 -0.1294304667 -0.1491235353 -0.0524324080 -0.1005239026 [51] 0.0159241783 -0.0193984045 -0.0035586807 -0.0080088352 0.0291396245 [56] -0.0244572781 -0.0268216410 -0.0772944845 0.0200023919 0.0814782028 > 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/3ktg31229860667.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/4iilv1229860667.tab") > > system("convert tmp/1oqzm1229860667.ps tmp/1oqzm1229860667.png") > system("convert tmp/2ogik1229860667.ps tmp/2ogik1229860667.png") > > > proc.time() user system elapsed 0.599 0.329 0.729