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(1775,2197,2920,4240,5415,6136,6719,6234,7152,3646,2165,2803,1615,2350,3350,3536,5834,6767,5993,7276,5641,3477,2247,2466,1567,2237,2598,3729,5715,5776,5852,6878,5488,3583,2054,2282,1552,2261,2446,3519,5161,5085,5711,6057,5224,3363,1899,2115,1491,2061,2419,3430,4778,4862,6176,5664,5529,3418,1941,2402,1579,2146,2462,3695,4831,5134,6250,5760,6249,2917,1741,2359,1511,2059,2635,2867,4403,5720,4502,5749,5627,2846,1762,2429,1169,2154,2249,2687,4359,5382,4459,6398,4596,3024,1887,2070,1351,2218,2461,3028,4784,4975,4607,6249,4809,3157,1910,2228,1594,2467,2222,3607,4685,4962,5770,5480,5000,3228,1993,2288,1588,2105,2191,3591,4668,4885,5822,5599,5340,3082,2010,2301) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '0' > par2 = '1' > par1 = '48' > ylab = '' > xlab = '' > main = '' > #'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/1wtqx1292526667.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/www/html/rcomp/tmp/2wtqx1292526667.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.267951409 0.173516534 0.312865818 -0.146369166 [6] 0.184600140 0.190251249 -0.174742216 0.114825584 0.228714256 [11] -0.155867048 0.147725129 0.000260414 -0.204690708 0.274381831 [16] -0.105527873 -0.114802747 0.111339975 -0.053777523 -0.136571559 [21] 0.083051996 -0.072389346 -0.225908748 0.257526642 -0.252359309 [26] -0.074060055 0.060478702 -0.138833609 -0.032847973 0.029821350 [31] -0.120621591 0.002489015 0.096788921 -0.127669781 -0.021294989 [36] 0.157143192 -0.267320756 0.273448119 -0.095191192 -0.098240774 [41] 0.154249145 0.004523527 -0.063039244 0.104039004 0.026583113 [46] -0.038073412 0.192678238 -0.012450426 -0.077238012 > (mypacf <- c(rpacf$acf)) [1] -0.267951409 0.109586676 0.418326689 0.024290184 0.013599835 [6] 0.185603314 -0.086202510 -0.151796295 0.242406711 0.085383636 [11] -0.090523808 -0.120802607 -0.175478990 0.124989044 0.063093744 [16] -0.077591835 -0.088146660 0.073723139 -0.140121699 -0.170740002 [21] 0.180940289 -0.061777302 0.013039215 -0.076283182 -0.098772697 [26] -0.094765778 0.147384759 0.034384876 -0.080392477 0.060772458 [31] 0.052449661 -0.050570972 0.057674841 -0.040913678 0.136408589 [36] -0.121854101 0.056351830 -0.037281665 0.003914644 -0.017076089 [41] 0.038600568 0.061532933 -0.043616950 0.002667270 0.120029334 [46] -0.012914380 0.069698397 -0.104444254 > 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/3sl661292526667.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/43un91292526667.tab") > try(system("convert tmp/1wtqx1292526667.ps tmp/1wtqx1292526667.png",intern=TRUE)) character(0) > try(system("convert tmp/2wtqx1292526667.ps tmp/2wtqx1292526667.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.598 0.348 3.126