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(93.0,99.2,112.2,112.1,103.3,108.2,90.4,72.8,111.0,117.9,111.3,110.5,94.8,100.4,132.1,114.6,101.9,130.2,84.0,86.4,122.3,120.9,110.2,112.6,102.0,105.0,130.5,115.5,103.7,130.9,89.1,93.8,123.8,111.9,118.3,116.9,103.6,116.6,141.3,107.0,125.2,136.4,91.6,95.3,132.3,130.6,131.9,118.6,114.3,111.3,126.5,112.1,119.3,142.4,101.1,97.4,129.1,136.9,129.8,123.9) > par5 = '12' > par4 = '0' > par3 = '0' > 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/19ov81229878247.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/2wrm71229878247.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.148463222 -0.211848863 0.199641957 -0.073086740 [6] 0.084846618 0.502485621 0.079809114 -0.051402584 0.135776825 [11] -0.260340856 0.099027774 0.671236452 0.017881686 -0.201283365 [16] 0.105095153 -0.158576979 -0.002869800 0.322228973 0.013425452 [21] -0.053443031 0.058753192 -0.280308717 0.038698414 0.386207439 [26] -0.082218427 -0.149725034 -0.004099174 -0.205868521 -0.051383255 [31] 0.156304950 -0.030898459 -0.048961436 -0.076057599 -0.272155664 [36] -0.024990760 0.201222060 -0.088977826 -0.173316499 -0.090795421 [41] -0.197699612 -0.107704825 0.079270991 -0.003732948 -0.069926919 [46] -0.104506996 -0.177625660 -0.037479049 0.050257345 -0.047599821 [51] -0.100224170 -0.089191233 -0.114212586 -0.070137260 0.014378586 [56] -0.003460836 -0.047610556 -0.050923158 -0.034718462 -0.015648727 > (mypacf <- c(rpacf$acf)) [1] 0.148463222 -0.239161631 0.297306081 -0.274118112 0.389374374 [6] 0.274442055 0.067117067 0.109896823 -0.034538898 -0.336533959 [11] 0.306888098 0.353899153 -0.118204718 -0.096103315 -0.087775972 [16] -0.030705076 -0.090454542 -0.146779151 0.077877787 -0.019066649 [21] 0.095496906 -0.058104145 0.056578773 -0.166928481 0.042771754 [26] -0.060116853 -0.090277747 -0.009934444 -0.026163670 -0.032443446 [31] 0.065226104 -0.084899314 -0.059313142 -0.013037319 -0.081147085 [36] 0.098470429 -0.040708263 -0.142522214 0.053840156 -0.083323373 [41] -0.023206380 0.028692699 -0.003152990 0.005753379 0.087380907 [46] 0.066149788 -0.017024905 -0.207651254 0.045438814 0.036927177 [51] -0.012157681 -0.001584766 0.071140635 -0.088857807 -0.083263103 [56] 0.033324407 0.032624970 0.039458101 0.065483101 > 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/3czcx1229878247.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/4v9i11229878248.tab") > > system("convert tmp/19ov81229878247.ps tmp/19ov81229878247.png") > system("convert tmp/2wrm71229878247.ps tmp/2wrm71229878247.png") > > > proc.time() user system elapsed 0.576 0.312 0.690