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(15.59,13.17,11.20,13.30,10.78,11.60,15.18,15.87,12.58,11.43,10.30,11.17,11.26,11.20,9.99,11.17,10.29,10.47,14.36,16.06,14.47,13.24,13.03,14.43,13.98,13.62,12.20,12.24,12.07,12.30,16.12,18.38,14.59,12.96,14.14,13.92,14.24,14.10,12.91,13.69,14.11,13.99,17.93,21.37,16.25,14.53,15.36,14.95,15.95,15.25,12.67,13.86,14.65,12.41,17.46,18.95,15.33,15.31,14.84,14.75,15.83,14.83,13.00,13.92,13.94,12.54,18.12,17.83,14.41,15.18,12.99,13.06,12.81,12.95,10.48,13.23,11.80,11.69,15.33,14.89,12.92,11.27,10.68,11.55) > par5 = '12' > par4 = '1' > 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/179zn1229552827.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/2kfbk1229552827.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.0000000000 -0.3859099813 0.0377072888 0.2205917959 -0.1880085599 [6] 0.0505344046 0.1096583661 -0.1234830444 -0.0051530971 0.2710254181 [11] -0.2552540923 0.0620791448 -0.0072234403 -0.2483802068 0.1748171349 [16] -0.0007176745 -0.2455180899 0.2134155340 0.1492266647 -0.2174974785 [21] 0.1574326466 0.0705313365 -0.2568296291 0.3838544338 -0.2237338110 [26] -0.0878771069 0.2909358275 -0.1772563651 0.0910724544 0.0272119399 [31] -0.1504142649 -0.0428738377 0.1072327740 -0.2158953849 0.0413262181 [36] 0.0888971712 -0.1100686362 0.0665834054 0.0020163937 -0.0711696038 [41] 0.0232656105 0.0432496814 -0.1583550400 0.1466645850 0.0323715836 [46] -0.1097345368 0.1924450349 -0.0918690295 -0.0970495483 0.1391886913 [51] -0.1248374249 -0.0525534596 0.0407184813 0.0016471193 -0.0492131521 [56] 0.0643027837 -0.0781709350 0.0245609891 -0.0885074290 -0.0204057818 [61] 0.0089607468 > (mypacf <- c(rpacf$acf)) [1] -0.3859099813 -0.1306811064 0.2230784708 -0.0136374434 -0.0395820637 [6] 0.0800570516 -0.0046308621 -0.0892592201 0.2544151606 -0.0237720015 [11] -0.0890925490 -0.1487822057 -0.2415918774 -0.0181031761 0.1049632393 [16] -0.1505985845 -0.0002746202 0.3058154610 0.1110120276 -0.0327564118 [21] 0.1961629676 -0.0650087480 0.1304625806 -0.1349814114 -0.2102534915 [26] 0.0063910466 -0.0537593597 0.0664155321 -0.0219185840 -0.0194160893 [31] -0.0121124202 -0.1195725282 -0.0011413299 0.1133309240 -0.0638831650 [36] 0.0026597614 -0.0392402043 -0.0483974477 0.1467322117 -0.0217937535 [41] -0.1272800324 -0.0620572318 0.0142677532 -0.0378306421 -0.0309424730 [46] 0.0132734856 0.0775340164 -0.0339397065 -0.0584120111 0.0665924151 [51] -0.0332697207 -0.1089133039 0.0505736024 -0.0692357366 0.0017709429 [56] -0.0276247611 -0.0056765089 -0.1198754396 0.0234805131 -0.0046360665 > 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/3penj1229552827.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/4kshh1229552827.tab") > > system("convert tmp/179zn1229552827.ps tmp/179zn1229552827.png") > system("convert tmp/2kfbk1229552827.ps tmp/2kfbk1229552827.png") > > > proc.time() user system elapsed 0.612 0.339 1.023