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(467,460,448,443,436,431,484,510,513,503,471,471,476,475,470,461,455,456,517,525,523,519,509,512,519,517,510,509,501,507,569,580,578,565,547,555,562,561,555,544,537,543,594,611,613,611,594,595,591,589,584,573,567,569,621,629,628,612,595,597,593,590,580,574,573,573,620,626,620,588,566,557,561,549,532,526,511,499,555,565,542,527,510,514) > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > #'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/17md51261342598.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/2lcs31261342598.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 2.621575e-01 -1.529557e-01 -3.082632e-01 -3.103484e-01 [6] 4.046734e-02 1.634043e-01 5.040729e-02 -2.604025e-01 -2.485345e-01 [11] -9.298325e-02 2.486751e-01 7.606088e-01 1.824709e-01 -1.333419e-01 [16] -2.708414e-01 -2.521039e-01 2.472128e-02 1.135366e-01 2.873881e-02 [21] -2.324365e-01 -1.980990e-01 -6.616119e-02 2.135433e-01 6.262682e-01 [26] 1.362036e-01 -1.560588e-01 -2.638200e-01 -2.242093e-01 3.223341e-02 [31] 8.334499e-02 1.674748e-02 -1.952930e-01 -1.693198e-01 -5.845592e-02 [36] 1.479697e-01 4.952336e-01 1.151742e-01 -1.166951e-01 -2.259535e-01 [41] -1.876726e-01 9.951615e-05 6.872107e-02 2.319633e-02 -1.624824e-01 [46] -1.284695e-01 -4.682213e-02 1.100594e-01 3.868087e-01 6.777259e-02 [51] -1.205565e-01 -1.786518e-01 -1.351065e-01 -7.697182e-03 5.562976e-02 [56] 2.270581e-03 -1.067781e-01 -6.052527e-02 -2.099803e-02 8.735664e-02 [61] 2.640738e-01 > (mypacf <- c(rpacf$acf)) [1] 0.2621574638 -0.2380420753 -0.2233514000 -0.2317730487 0.1038014877 [6] -0.0174839336 -0.1079309411 -0.3427002134 -0.1015846767 -0.1280522394 [11] 0.1364369493 0.6463187451 -0.1453731781 0.1585751840 0.0787453436 [16] 0.1328339838 -0.0567650876 -0.0191061471 -0.0139514092 -0.0438767245 [21] -0.0401708860 -0.0899240335 -0.0451579296 0.0985928105 -0.0591985434 [26] -0.1040523116 -0.0307041283 -0.0199051710 0.0097471029 -0.0993450478 [31] -0.0067895111 0.0114953489 -0.0300702619 -0.0649736316 -0.1323146246 [36] -0.0089176106 0.0004055432 0.0254048368 -0.0514616151 0.0383364735 [41] -0.0490350164 0.0927116636 -0.0399513977 0.0054620406 0.0213241500 [46] 0.0335355253 -0.0060308441 -0.0593087842 -0.0652401980 -0.0645613223 [51] 0.0280690399 -0.0601593632 -0.0797638059 -0.0319046558 -0.0392549446 [56] 0.0676576265 0.0162484408 0.0141159954 0.0473153089 -0.0461009152 > 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/3v6mn1261342598.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/4c5821261342598.tab") > try(system("convert tmp/17md51261342598.ps tmp/17md51261342598.png",intern=TRUE)) character(0) > try(system("convert tmp/2lcs31261342598.ps tmp/2lcs31261342598.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.593 0.318 0.690