R version 2.7.0 (2008-04-22) 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(527,516,503,489,479,475,524,552,532,511,492,492,493,481,462,457,442,439,488,521,501,485,464,460,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) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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/177u11229870290.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/2lmc01229870290.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 1.301298e-02 -1.075161e-01 -1.802697e-01 4.989445e-02 [6] 1.777816e-01 4.820276e-02 1.286099e-02 8.859976e-02 3.019928e-01 [11] -5.945935e-02 -1.733387e-01 -2.628415e-01 1.804954e-01 3.054613e-01 [16] 7.270703e-03 -1.635704e-02 -7.896759e-02 9.198928e-02 -2.391358e-02 [21] 2.857813e-02 6.760016e-02 4.755975e-02 2.299338e-01 -7.158715e-02 [26] -1.678013e-01 -1.837368e-01 1.778120e-01 -4.506645e-02 1.028606e-01 [31] -1.020740e-01 -9.258679e-02 4.836465e-02 -1.277482e-01 -8.761482e-02 [36] -1.032027e-01 6.655955e-02 5.530104e-02 2.025610e-02 -1.456232e-01 [41] -1.123713e-01 5.948327e-02 1.099761e-02 2.233095e-02 -1.044606e-01 [46] -6.056617e-02 -7.850026e-03 -2.038637e-02 -5.416434e-02 -8.785905e-02 [51] 8.697836e-02 -8.195255e-02 2.232197e-02 -1.194415e-01 -4.100592e-02 [56] 4.687554e-05 -6.306432e-04 -4.274527e-02 -2.274948e-02 1.627255e-02 [61] -3.675972e-02 > (mypacf <- c(rpacf$acf)) [1] 0.013012979 -0.107703699 -0.179429753 0.041867023 0.146303127 [6] 0.027239920 0.061997601 0.159640782 0.341156263 -0.034644742 [11] -0.115620076 -0.251591050 0.054411389 0.149495679 -0.067920711 [16] 0.088194476 0.037534640 0.042228850 -0.023751887 0.123695024 [21] 0.207289124 -0.140002434 0.088963596 -0.045861110 -0.141218360 [26] -0.201931668 0.028357078 -0.205907427 -0.010561113 -0.122339485 [31] -0.058670301 0.073181581 -0.001942418 -0.091352518 0.004945564 [36] -0.071849390 -0.094761190 -0.006627763 0.057543914 -0.127786564 [41] 0.035518280 0.098825646 0.015677383 -0.017829034 -0.035717307 [46] -0.018768950 -0.020557394 0.019707401 0.071538138 0.060084964 [51] -0.040512334 0.005710229 0.080222616 0.076395846 -0.008220530 [56] -0.098317801 -0.009776449 -0.032443137 -0.123536186 0.030307747 > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/31mtl1229870290.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4327e1229870290.tab") > > system("convert tmp/177u11229870290.ps tmp/177u11229870290.png") > system("convert tmp/2lmc01229870290.ps tmp/2lmc01229870290.png") > > > proc.time() user system elapsed 1.533 0.552 1.646