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(621.0,604.0,584.0,574.0,555.0,545.0,599.0,620.0,608.0,590.0,579.0,580.0,579.0,572.0,560.0,551.0,537.0,541.0,588.0,607.0,599.0,578.0,563.0,566.0,561.0,554.0,540.0,526.0,512.0,505.0,554.0,584.0,569.0,540.0,522.0,526.0,527.0,516.0,503.0,489.0,479.0,475.0,524.0,552.0,532.0,511.0,492.0,492.0,493.0,481.0,462.0,457.0,442.0,439.0,488.0,521.0,501.0,485.0,464.0,460.0,467.0,460.0,448.0,443.0,436.0,431.0,484.0,510.0,513.0,503.0,471.0,471.0,476.0,475.0,470.0,461.0,455.0,456.0,517.0,525.0,523.0,519.0,509.0,512.0,519.0,517.0,510.0,509.0,501.0,507.0,569.0,580.0,578.0,565.0,547.0,555.0,562.0,561.0,555.0,544.0,537.0,543.0,594.0,611.0,613.0,611.0,594.0,595.0,591.0,589.0,584.0,573.0,567.0,569.0,621.0,629.0,628.0,612.0,595.0,597.0,593.0,590.0,580.0,574.0,573.0,573.0,620.0,626.0,620.0,588.0,566.0,557.0,561.0,549.0,532.0,526.0,511.0,499.0,555.0,565.0,542.0,527.0,510.0,514.0,517.0,508.0,493.0,490.0,469.0,478.0,528.0,534.0,518.0,506.0,502.0) > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '36' > #'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/1bngy1261242249.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/2ffmz1261242249.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.0171892098 -0.0378154511 0.0345675892 0.0871231074 [6] 0.0993326520 0.0817245784 -0.0029036515 0.0851495904 0.1034522323 [11] -0.0544575797 0.0539634010 -0.2288245686 0.0163358514 0.1895652313 [16] 0.0194222492 -0.0764800702 -0.0306948777 0.0063470235 0.0008194501 [21] 0.0222576982 0.0342578109 0.0520554676 0.1497641059 -0.1177862271 [26] -0.1228186018 -0.1201293995 0.0638299386 -0.0219942060 0.0935533303 [31] -0.0932952689 -0.0699956217 0.0208820145 -0.0833917080 -0.0984748552 [36] -0.0809668800 -0.0135416989 > (mypacf <- c(rpacf$acf)) [1] -0.017189210 -0.038122184 0.033295713 0.087097924 0.106130300 [6] 0.093775193 0.004483954 0.079647888 0.088321694 -0.067987185 [11] 0.036871364 -0.272025612 -0.028798405 0.152225962 0.035325382 [16] -0.020299250 -0.020508072 0.016835521 -0.022559006 0.031756125 [21] 0.104280160 0.005118488 0.169700184 -0.174953520 -0.169820445 [26] -0.122255028 0.027619685 -0.083399887 0.115062631 -0.015968169 [31] -0.055317991 0.045592053 0.007698236 -0.105832022 -0.015862389 [36] -0.100368568 > 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/3mzo01261242249.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/44yyh1261242249.tab") > > try(system("convert tmp/1bngy1261242249.ps tmp/1bngy1261242249.png",intern=TRUE)) character(0) > try(system("convert tmp/2ffmz1261242249.ps tmp/2ffmz1261242249.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.547 0.302 0.683