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(227.86 + ,198.24 + ,194.97 + ,184.88 + ,196.79 + ,205.36 + ,226.72 + ,226.05 + ,202.50 + ,194.79 + ,192.43 + ,219.25 + ,217.47 + ,192.34 + ,196.83 + ,186.07 + ,197.31 + ,215.02 + ,242.67 + ,225.17 + ,206.69 + ,197.75 + ,196.43 + ,213.55 + ,222.75 + ,194.03 + ,201.85 + ,189.50 + ,206.07 + ,225.59 + ,247.91 + ,247.64 + ,213.01 + ,203.01 + ,200.26 + ,220.50 + ,237.90 + ,216.94 + ,214.01 + ,196.00 + ,208.37 + ,232.75 + ,257.46 + ,267.69 + ,220.18 + ,210.61 + ,209.59 + ,232.75 + ,232.75 + ,219.82 + ,226.74 + ,208.04 + ,220.12 + ,235.69 + ,257.05 + ,258.69 + ,227.15 + ,219.91 + ,219.30 + ,259.04 + ,237.29 + ,212.88 + ,226.03 + ,211.07 + ,222.91 + ,249.18 + ,266.38 + ,268.53 + ,238.02 + ,224.69 + ,213.75 + ,237.43 + ,248.46 + ,210.82 + ,221.40 + ,209.00 + ,234.37 + ,248.43 + ,271.98 + ,268.11 + ,233.88 + ,223.43 + ,221.38 + ,233.76 + ,243.97 + ,217.76 + ,224.66 + ,210.84 + ,220.35 + ,236.84 + ,266.15 + ,255.20 + ,234.76 + ,221.29 + ,221.26 + ,244.13 + ,245.78 + ,224.62 + ,234.80 + ,211.37 + ,222.39 + ,249.63 + ,282.29 + ,279.13 + ,236.60 + ,223.62 + ,225.86 + ,246.41 + ,261.70 + ,225.01 + ,231.54 + ,214.82 + ,227.70 + ,263.86 + ,278.15 + ,274.64 + ,237.66 + ,227.97 + ,224.75 + ,242.91 + ,253.08 + ,228.13 + ,233.68 + ,217.38 + ,236.38 + ,256.08 + ,292.83 + ,304.71 + ,245.57 + ,234.41 + ,234.12 + ,258.17 + ,268.66 + ,245.31 + ,247.47 + ,226.25 + ,251.67 + ,268.79 + ,288.94 + ,290.16 + ,250.69 + ,240.80) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1bpam1272545838.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/2mhs71272545838.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.00000000 0.10932700 -0.23165972 -0.51228289 -0.30795587 0.31315548 [7] 0.24175413 0.33769028 -0.29202595 -0.48018374 -0.20183302 0.11605143 [13] 0.82317720 0.14773659 -0.20521461 -0.47379446 -0.27126603 0.25206852 [19] 0.21169331 0.31942962 -0.23849902 -0.43530609 -0.19594858 0.11370064 [25] 0.71361955 0.14798998 -0.17291876 -0.42610784 -0.27273486 0.25894278 [31] 0.16851567 0.29485291 -0.20281212 -0.40241074 -0.17066511 0.10453080 [37] 0.64589867 0.11437798 -0.17666884 -0.32895397 -0.25325995 0.22556628 [43] 0.12767270 0.24972794 -0.16257267 -0.34093914 -0.14789294 0.08251382 [49] 0.56441108 > (mypacf <- c(rpacf$acf)) [1] 1.093270e-01 -2.465591e-01 -4.889704e-01 -4.080448e-01 1.012589e-01 [6] -1.921789e-01 1.883226e-01 -2.622614e-01 -3.999692e-01 -3.667792e-01 [11] -4.358200e-01 4.259483e-01 2.954766e-02 1.014713e-02 1.083509e-01 [16] 2.076560e-01 7.409367e-03 -4.458739e-02 -2.725876e-02 1.257992e-02 [21] -6.155717e-02 -9.945996e-02 -8.929429e-02 6.196209e-02 -7.348453e-02 [26] -4.645884e-02 1.850950e-02 -7.851893e-02 1.571366e-01 -4.038476e-02 [31] 7.052563e-04 2.886630e-02 -1.136074e-02 -2.449328e-02 -3.168993e-05 [36] 3.083641e-02 -7.675988e-02 -1.218824e-01 1.319105e-01 3.222070e-02 [41] -5.354224e-02 -4.291782e-02 -3.561803e-02 5.022416e-03 -1.821618e-03 [46] -6.974186e-02 -3.580066e-02 7.787229e-03 > 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/3ph8d1272545838.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/4b0oj1272545838.tab") > > try(system("convert tmp/1bpam1272545838.ps tmp/1bpam1272545838.png",intern=TRUE)) character(0) > try(system("convert tmp/2mhs71272545838.ps tmp/2mhs71272545838.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.573 0.317 0.814