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(106.7,110.2,125.9,100.1,106.4,114.8,81.3,87,104.2,108,105,94.5,92,95.9,108.8,103.4,102.1,110.1,83.2,82.7,106.8,113.7,102.5,96.6,92.1,95.6,102.3,98.6,98.2,104.5,84,73.8,103.9,106,97.2,102.6,89,93.8,116.7,106.8,98.5,118.7,90,91.9,113.3,113.1,104.1,108.7,96.7,101,116.9,105.8,99,129.4,83,88.9,115.9,104.2,113.4,112.2,100.8,107.3,126.6,102.9,117.9,128.8,87.5,93.8,122.7,126.2,124.6,116.7,115.2,111.1,129.9,113.3,118.5,137.9,103.6,101.7,127.4,137.5,128.3,118.2,117.1,124.2,126,132.1) > par5 = '12' > par4 = '2' > par3 = '2' > 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/1blay1228846276.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/24aql1228846276.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.000000000 -0.708205546 0.184329324 0.151753988 -0.241317765 [6] 0.130131565 0.106063900 -0.278236905 0.295904567 -0.225621990 [11] 0.060583135 0.202436104 -0.376327628 0.322131307 -0.168847048 [16] 0.053563331 0.007806133 -0.006858203 -0.047072805 0.110524203 [21] -0.200699687 0.313970152 -0.351283312 0.249464493 -0.058274399 [26] -0.122101085 0.195236512 -0.127306118 0.001920336 0.068172808 [31] -0.064067218 0.011599974 0.084263871 -0.187618813 0.234240473 [36] -0.181900035 0.061455690 0.048279243 -0.080909882 0.024874693 [41] 0.044045193 -0.044748783 0.013127633 -0.030049039 0.064874530 [46] -0.052699563 -0.011645946 0.073652701 -0.093259394 0.066941697 [51] -0.025070555 0.007063466 -0.019692476 0.020439027 -0.002576221 [56] 0.006571247 -0.024362985 0.040168032 -0.049231013 0.037410419 [61] -0.010523014 > (mypacf <- c(rpacf$acf)) [1] -0.708205546 -0.636430962 -0.287791304 -0.230425371 -0.317470124 [6] 0.057328850 0.017913378 0.162226275 -0.019355602 -0.250772719 [11] 0.164417405 0.014091407 0.041434832 -0.196832923 0.030690171 [16] -0.046492284 -0.067381163 0.007301358 0.092230057 -0.147223382 [21] 0.052210040 -0.140846341 0.040280665 0.100350115 -0.034914672 [26] -0.038307871 -0.020768728 0.080356426 -0.095013978 -0.001660420 [31] 0.017858713 -0.004982134 -0.004899068 -0.054088877 0.154636330 [36] 0.044993812 0.010208467 -0.056683724 -0.013078619 -0.078318015 [41] 0.056415698 0.056984889 -0.052320401 -0.048378838 -0.065962582 [46] -0.053043503 -0.083855142 0.006366420 -0.005158114 -0.024516027 [51] -0.015788246 -0.062598626 -0.038231217 0.026303540 -0.034466236 [56] 0.006956688 0.124510864 -0.020407238 0.015202403 -0.043547506 > 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/303d21228846276.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/4ciwq1228846276.tab") > system("convert tmp/1blay1228846276.ps tmp/1blay1228846276.png") > system("convert tmp/24aql1228846276.ps tmp/24aql1228846276.png") > > > proc.time() user system elapsed 1.615 0.623 1.723