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(101.8,103.4,104.9,105.1,105.6,104.5,105.5,105.1,106.9,106.6,106.6,106.5,109.7,109.5,109.2,109.1,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.0,109.2,113.3,112.3,112.3,116.3,118.3,119.4,119.4,119.4,120.1,121.7,123.7,123.7,128.5,127.1,122.6,119.8,122.7,123.4,123.8,121.8,121.2,121.2,121.2,121.2,129.6,131.0,131.0,129.8,129.8,134.9,131.2,127.1,130.5,130.5,131.7,131.7,131.7) > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1.0' > par1 = '48' > #'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/1pzwm1196180898.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/2j9i51196180898.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.00000000 0.94284455 0.88759898 0.84461387 0.80592956 0.76408439 [7] 0.72269358 0.67586362 0.62177931 0.57364254 0.52599300 0.48316036 [13] 0.44514519 0.40751388 0.38561700 0.36676425 0.35281251 0.33219114 [19] 0.30399973 0.27435402 0.24833102 0.21981606 0.19470103 0.16167135 [25] 0.11891503 0.06462371 0.02050687 -0.02508232 -0.06370619 -0.09813777 [31] -0.13705543 -0.17514549 -0.21074801 -0.24661175 -0.27906805 -0.30385195 [37] -0.32912778 -0.35026307 -0.36441436 -0.37785304 -0.38137800 -0.38370105 [43] -0.38325802 -0.38317126 -0.38100525 -0.37861254 -0.37334993 -0.36500320 [49] -0.35590454 > (mypacf <- c(rpacf$acf)) [1] 0.942844550 -0.012219115 0.081429747 0.018747813 -0.037726099 [6] -0.011937117 -0.076095838 -0.095829653 0.009500285 -0.042880741 [11] 0.019529748 0.022612847 -0.012848459 0.139625028 0.018967276 [16] 0.056202912 -0.056354384 -0.098845871 -0.053095610 -0.032854882 [21] -0.079154162 0.018081995 -0.102852348 -0.084414929 -0.135991115 [26] 0.026991407 -0.048617022 0.043371313 0.024956255 -0.055728545 [31] -0.025221527 -0.041075217 -0.076308940 -0.025155417 0.002137448 [36] -0.068553656 0.001768288 -0.018834876 0.005152661 0.089062749 [41] 0.045011688 0.053380822 -0.001046533 -0.015763981 -0.020760784 [46] -0.018676707 0.032560949 0.015524540 > 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/3ehuv1196180898.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/44mgk1196180898.tab") > > system("convert tmp/1pzwm1196180898.ps tmp/1pzwm1196180898.png") > system("convert tmp/2j9i51196180898.ps tmp/2j9i51196180898.png") > > > proc.time() user system elapsed 0.854 0.329 0.966