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(3030.29,2803.47,2767.63,2882.6,2863.36,2897.06,3012.61,3142.95,3032.93,3045.78,3110.52,3013.24,2987.1,2995.55,2833.18,2848.96,2794.83,2845.26,2915.02,2892.63,2604.42,2641.65,2659.81,2638.53,2720.25,2745.88,2735.7,2811.7,2799.43,2555.28,2304.98,2214.95,2065.81,1940.49,2042,1995.37,1946.81,1765.9,1635.25,1833.42,1910.43,1959.67,1969.6,2061.41,2091.48,2120.88,2174.56,2196.72,2350.44,2440.25,2408.64,2472.81,2407.6,2452.62,2448.05,2497.84,2645.64,2756.76,2849.27,2921.44,2981.85,3080.58,3106.22,3119.31,3061.26,3097.31,3161.69,3257.16,3277.01,3295.32,3363.99,3494.17,3667.03,3813.06,3917.96,3895.51,3801.06,3570.12,3701.61,3862.27,3970.1,4138.52,4199.75,4290.89,4443.91,4502.64,4356.98,4591.27,4696.96,4621.4,4562.84,4202.52,4296.49,4435.23,4105.18,4116.68,3844.49,3720.98,3674.4,3857.62,3801.06,3504.37,3032.6,3047.03,2962.34,2197.82,2014.45,1862.83,1905.41) > 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: 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/1rtnp1242136115.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/2ikf91242136115.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.278230642 0.082319599 0.197028291 0.141098770 [6] 0.183000489 0.089840958 0.049074258 0.117249164 0.124866579 [11] 0.044184495 0.171856002 0.051414701 -0.017217759 0.108935330 [16] 0.070162387 0.060561586 -0.027941684 -0.078489357 0.003358076 [21] -0.071501069 -0.037348776 -0.068527846 -0.128992437 -0.084277529 [26] -0.015883340 -0.082643913 -0.056191490 -0.003985479 -0.037987908 [31] -0.030741225 -0.061714877 -0.032274579 -0.084220238 -0.090428488 [36] -0.123663686 -0.038606740 -0.059196679 -0.080253645 -0.005211316 [41] -0.055795265 -0.059390016 -0.068475205 -0.115248606 -0.044637520 [46] -0.085925702 -0.100750644 -0.098598082 -0.080827150 > (mypacf <- c(rpacf$acf)) [1] 0.278230642 0.005319071 0.187268095 0.043239407 0.143534464 [6] -0.027939395 0.007337724 0.053779578 0.059575974 -0.033003288 [11] 0.159489114 -0.082932617 -0.036538060 0.058268319 0.015441322 [16] 0.011053536 -0.087288942 -0.071721446 -0.011814510 -0.112844415 [21] 0.051891155 -0.091616207 -0.072003224 -0.022287979 0.030421144 [26] -0.055131872 0.037776409 0.053152549 0.022874512 -0.040816100 [31] 0.017269061 0.020567061 -0.079444226 0.013255120 -0.099198234 [36] 0.039150009 -0.038894736 0.013371307 0.032176201 -0.057269162 [41] -0.019757496 -0.042273379 -0.114066007 0.040732758 -0.075631945 [46] -0.012991906 -0.073376174 0.001032471 > 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/3wtz21242136115.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/4r2o61242136115.tab") > > system("convert tmp/1rtnp1242136115.ps tmp/1rtnp1242136115.png") > system("convert tmp/2ikf91242136115.ps tmp/2ikf91242136115.png") > > > proc.time() user system elapsed 0.584 0.314 0.748