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(9.026,9.787,9.536,9.490,9.736,9.694,9.647,9.753,10.070,10.137,9.984,9.732,9.103,9.155,9.308,9.394,9.948,10.177,10.002,9.728,10.002,10.063,10.018,9.960,10.236,10.893,10.756,10.940,10.997,10.827,10.166,10.186,10.457,10.368,10.244,10.511,10.812,10.738,10.171,9.721,9.897,9.828,9.924,10.371,10.846,10.413,10.709,10.662,10.570,10.297,10.635,10.872,10.296,10.383,10.431,10.574,10.653,10.805,10.872,10.625,10.407,10.463,10.556,10.646,10.702,11.353,11.346,11.451,11.964,12.574,13.031,13.812,14.544,14.931,14.886,16.005,17.064,15.168,16.050,15.839,15.137,14.954,15.648,15.305) > par5 = '12' > par4 = '0' > 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/12gty1228815999.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/2fjil1228815999.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.940213476 0.882895459 0.836703771 0.773380054 [6] 0.696045412 0.626559820 0.565883546 0.470533967 0.391121172 [11] 0.329582245 0.264345333 0.199324635 0.144884310 0.104230687 [16] 0.072558497 0.048362444 0.037625246 0.029431547 0.017583409 [21] 0.008181063 0.002178158 -0.004717278 -0.011004803 -0.013618158 [26] -0.014946635 -0.020189003 -0.025487623 -0.027212988 -0.033047751 [31] -0.039280460 -0.047378103 -0.051817163 -0.065850212 -0.073311399 [36] -0.074392059 -0.077976504 -0.081403512 -0.079335479 -0.077238970 [41] -0.086088290 -0.089813036 -0.087109556 -0.083000126 -0.078907429 [46] -0.068433265 -0.064400001 -0.066041954 -0.075643863 > (mypacf <- c(rpacf$acf)) [1] 0.9402134756 -0.0095339125 0.0658971011 -0.1700872684 -0.1561187042 [6] -0.0081998299 0.0375946631 -0.3091531376 0.0893962648 0.0382230607 [11] -0.0004243655 -0.0015867423 -0.0205372943 0.0293531122 0.1670639962 [16] -0.0318288135 0.0406549070 -0.0070710651 -0.0697932671 -0.0311879745 [21] -0.0356423060 -0.0775519593 0.0473569972 -0.0050440310 0.0137757092 [26] 0.0064228238 -0.0145244137 0.0260956569 -0.0003695633 -0.0165768697 [31] -0.0266816431 0.0199873741 -0.1112321151 0.0636402243 -0.0037424417 [36] -0.0003355154 0.0106951868 0.0444508328 -0.0452806105 -0.0288231453 [41] -0.0337984155 0.0242714983 0.0555546780 0.0096777983 0.0110015356 [46] -0.0664246857 -0.0351561171 -0.1187699825 > 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/3b4fe1228815999.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/4kt151228815999.tab") > > system("convert tmp/12gty1228815999.ps tmp/12gty1228815999.png") > system("convert tmp/2fjil1228815999.ps tmp/2fjil1228815999.png") > > > proc.time() user system elapsed 0.574 0.320 0.858