R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(105.3,103,103.8,103.4,105.8,101.4,97,94.3,96.6,97.1,95.7,96.9,97.4,95.3,93.6,91.5,93.1,91.7,94.3,93.9,90.9,88.3,91.3,91.7,92.4,92,95.6,95.8,96.4,99,107,109.7,116.2,115.9,113.8,112.6,113.7,115.9,110.3,111.3,113.4,108.2,104.8,106,110.9,115,118.4,121.4,128.8,131.7,141.7,142.9,139.4,134.7,125,113.6,111.5,108.5,112.3,116.6,115.5,120.1,132.9,128.1,129.3,132.5,131,124.9,120.8,122,122.1,127.4,135.2,137.3,135,136,138.4,134.7,138.4,133.9,133.6,141.2,151.8,155.4,156.6,161.6,160.7,156,159.5,168.7,169.9,169.9,185.9) > 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/1f7cd1196523599.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/2f90j1196523599.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.2846756732 0.0521978873 0.1426310971 -0.0204948325 [6] -0.3042478924 -0.1847221241 -0.0868610932 -0.1231503787 -0.1087067773 [11] 0.0950196692 0.1302126624 0.0672567836 0.1320447584 0.2261477267 [16] -0.1166305342 0.0252210546 -0.0348728432 -0.0473745070 0.0328672555 [21] 0.1219468304 0.0421482315 0.0165181171 -0.0459194247 -0.0975709633 [26] -0.1455551363 -0.0731097263 -0.0481634601 -0.0450472919 -0.1632786849 [31] 0.0422013965 -0.0006190302 0.1459078813 0.0837485328 0.0121243900 [36] -0.0115538245 0.0050672228 -0.1556561935 -0.0925364214 0.0048413309 [41] -0.0028397515 0.0185547340 0.0892789351 -0.0217570030 0.0036143904 [46] 0.0080767749 0.0863989438 -0.0430068461 0.0363930376 0.0595958394 [51] 0.0360741311 -0.0444251560 0.0576035097 0.0715312869 -0.0108749106 [56] -0.0325558766 -0.0221531976 -0.0392223767 -0.0097040484 0.0143760494 [61] 0.0740706338 > (mypacf <- c(rpacf$acf)) [1] 0.284675673 -0.031385870 0.148400821 -0.112905434 -0.296997235 [6] -0.045234765 -0.015505689 -0.011904923 -0.062752337 0.073820651 [11] 0.052015297 0.011782002 0.057734019 0.125496286 -0.234920581 [16] 0.187344255 -0.147706745 0.146040660 0.142076359 0.056704179 [21] 0.017053870 -0.053887335 -0.104563615 -0.095550879 -0.052106627 [26] 0.052780170 -0.020800131 -0.021674656 -0.186977451 -0.031966344 [31] -0.011267030 0.158365879 -0.094874665 -0.096170238 -0.038125301 [36] 0.037664337 -0.058301099 0.047048062 0.021119195 0.001355829 [41] 0.088526675 0.014751001 -0.033984761 -0.004686846 0.092454495 [46] -0.004038385 0.042077408 0.096600849 0.047344353 0.072994797 [51] -0.046023350 -0.078026342 0.045968138 -0.013952550 0.004800188 [56] -0.018999568 0.073155101 -0.079070415 0.009322334 -0.035817267 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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/30q4g1196523599.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/40a9y1196523599.tab") > > system("convert tmp/1f7cd1196523599.ps tmp/1f7cd1196523599.png") > system("convert tmp/2f90j1196523599.ps tmp/2f90j1196523599.png") > > > proc.time() user system elapsed 0.910 0.339 1.103