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(2072.65,2020.13,2032.76,2050.31,2128.98,2122.14,2122.89,2091.95,2002.97,1923.21,1834.44,1819.15,1792.00,1822.40,1900.70,1903.00,1958.80,1820.50,1719.80,1661.10,1664.40,1703.40,1774.90,1795.00,1816.30,1867.40,1900.00,1961.10,2065.70,2073.50,2080.80,2118.00,2099.00,2085.20,1937.70,1749.50,1750.30,1675.60,1697.50,1699.80,1655.90,1636.00,1614.20,1602.30,1548.70,1556.10,1526.90,1509.20,1566.30,1596.00,1654.50,1664.20,1687.70,1691.00,1664.60,1697.50,1685.10,1643.00,1559.60,1560.20,1590.16,1604.93,1661.80,1670.73,1692.40,1688.17,1658.04,1613.46,1595.11,1558.83,1526.65,1475.19) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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/www/html/rcomp/tmp/1kkio1262179101.ps",horizontal=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/www/html/rcomp/tmp/22v831262179101.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.440798280 0.257803523 -0.016601809 -0.248884843 [6] -0.137926150 -0.192985370 -0.098995228 -0.085752165 0.011705744 [11] -0.013893984 -0.042088610 -0.023424825 -0.269808319 -0.168814643 [16] -0.189557957 -0.051232932 0.111796760 -0.055350924 -0.160541421 [21] -0.122691741 -0.157432135 0.063372833 0.180031607 0.225315945 [26] 0.186620018 0.128388527 0.104806385 -0.007974679 -0.012734754 [31] -0.152271704 -0.142728696 0.011242900 0.008827097 0.189006571 [36] 0.095394851 0.114538020 0.061795861 -0.024680624 0.033880502 [41] -0.033939175 -0.024289423 -0.127332484 -0.134380210 -0.103515252 [46] -0.084376322 0.025659125 -0.005789989 0.085619443 0.063256308 [51] 0.034512391 0.003825400 -0.032520401 -0.046099203 -0.081852038 [56] -0.058361658 -0.002075954 0.030503239 0.054559832 0.046659331 [61] 0.044827205 > (mypacf <- c(rpacf$acf)) [1] 0.440798280 0.078814255 -0.194863842 -0.255372503 0.129051809 [6] -0.092630263 -0.044272397 -0.082364472 0.110444295 -0.114349930 [11] -0.078799465 -0.003702063 -0.304081878 -0.014754900 -0.041747930 [16] 0.050481496 -0.021065763 -0.273259450 -0.352610775 0.103157068 [21] -0.153487600 0.093660522 0.017669495 0.014875118 -0.175674088 [26] -0.098699113 0.079181820 -0.148047343 -0.087720199 -0.077872741 [31] -0.095482632 -0.055944443 -0.128488071 -0.105528765 0.041232564 [36] 0.107062881 -0.023615542 -0.083036129 -0.007515382 -0.083535692 [41] -0.044938434 0.010171658 -0.042556002 -0.138846649 0.006630086 [46] -0.018564863 -0.020408532 0.068699232 -0.070583378 -0.035983137 [51] -0.032384411 0.067717905 -0.022059922 -0.024344451 0.033275323 [56] 0.006173906 -0.007061716 0.006419423 -0.061932546 0.046888038 > 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/36xem1262179101.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/448631262179101.tab") > > try(system("convert tmp/1kkio1262179101.ps tmp/1kkio1262179101.png",intern=TRUE)) character(0) > try(system("convert tmp/22v831262179101.ps tmp/22v831262179101.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.610 0.344 0.757