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(2236,2084.9,2409.5,2199.3,2203.5,2254.1,1975.8,1742.2,2520.6,2438.1,2126.3,2267.5,2201.1,2128.5,2596,2458.2,2210.5,2621.2,2231.4,2103.6,2685.8,2539.3,2462.4,2693.3,2307.7,2385.9,2737.6,2653.9,2545.4,2848.8,2359.5,2488.3,2861.1,2717.9,2844,2749,2652.9,2660.2,3187.1,2774.1,3158.2,3244.6,2665.5,2820.8,2983.4,3077.4,3024.8,2731.8,3046.2,2834.8,3292.8,2946.1,3196.9,3284.2,3003,2979,3137.4,3630.2,3270.7,2942.3) > par5 = '12' > par4 = '1' > par3 = '0' > 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/1dfgr1228320146.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/25rhe1228320146.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.000000e+00 -9.058115e-02 5.908451e-02 2.390959e-01 -3.406413e-02 [6] -2.687001e-02 4.702478e-02 -2.540842e-01 3.853424e-02 1.184881e-01 [11] -3.043186e-01 -8.246553e-02 1.537955e-02 -2.032316e-01 1.264507e-01 [16] -5.899971e-02 -1.330521e-01 2.597493e-01 -3.530506e-02 -6.733766e-05 [21] 7.661351e-02 4.335484e-02 -1.533386e-01 2.579686e-01 -2.190560e-01 [26] -1.023045e-01 1.099164e-01 -1.445662e-01 -1.544976e-01 -3.808033e-02 [31] -1.157848e-01 5.158273e-02 -2.331871e-03 -1.014984e-01 9.637701e-02 [36] 8.519196e-02 -5.744791e-02 5.632269e-02 5.590485e-02 8.048171e-02 [41] 1.391506e-01 -3.836197e-02 -8.291499e-03 2.466949e-02 -4.097703e-02 [46] -8.737271e-02 5.023691e-05 5.556902e-03 > (mypacf <- c(rpacf$acf)) [1] -0.090581152 0.051300481 0.251540575 0.008681602 -0.066614775 [6] -0.021993649 -0.256845192 0.009209220 0.181474626 -0.187859081 [11] -0.195533095 -0.058471680 -0.088679752 0.166067609 0.019369927 [16] -0.103804293 0.079845234 -0.055343365 0.111333455 -0.041641276 [21] 0.021080766 -0.235234278 0.140676966 -0.076839720 -0.113031429 [26] -0.042692969 -0.023802087 -0.147406202 -0.138412371 0.060170906 [31] 0.063826660 -0.069638267 -0.041119524 0.021301805 -0.081437752 [36] -0.002384485 -0.025400541 -0.015525174 0.125255728 -0.064179261 [41] 0.025724518 -0.097383132 -0.073795991 -0.077772931 0.080567364 [46] -0.014874306 0.070445965 > 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/3kcb11228320146.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/456mc1228320146.tab") > > system("convert tmp/1dfgr1228320146.ps tmp/1dfgr1228320146.png") > system("convert tmp/25rhe1228320146.ps tmp/25rhe1228320146.png") > > > proc.time() user system elapsed 0.583 0.318 0.703