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(189917,184128,175335,179566,181140,177876,175041,169292,166070,166972,206348,215706,202108,195411,193111,195198,198770,194163,190420,189733,186029,191531,232571,243477,227247,217859,208679,213188,216234,213587,209465,204045,200237,203666,241476,260307,243324,244460,233575,237217,235243,230354,227184,221678,217142,219452,256446,265845,248624,241114,229245,231805,219277,219313,212610,214771,211142,211457,240048,240636,230580) > 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/1hmbk1228322263.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/2stkv1228322263.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.207739806 -0.289975197 -0.252559017 -0.161321265 [6] 0.024374544 0.036680051 0.058380471 -0.185596321 -0.238892359 [11] -0.255327165 0.220481701 0.778233392 0.161075598 -0.253194358 [16] -0.223245127 -0.125451084 -0.011971287 0.050096570 0.054869719 [21] -0.151848566 -0.184404822 -0.197956370 0.165598233 0.559906137 [26] 0.122328308 -0.182344717 -0.115081909 -0.092937347 -0.007482244 [31] 0.006915985 0.037408168 -0.094734402 -0.132376960 -0.114439435 [36] 0.099489424 0.340841435 0.053752550 -0.126558851 -0.063813113 [41] -0.041997857 -0.008648919 -0.002325073 0.034748023 -0.055345756 [46] -0.046084428 -0.039540850 0.056078249 0.145226192 -0.002185868 [51] -0.041357873 -0.009778776 0.002153151 -0.002294956 0.009410753 [56] 0.017478631 -0.027524071 -0.022043101 0.010347233 0.007025119 > (mypacf <- c(rpacf$acf)) [1] 0.2077398065 -0.3481559840 -0.1177612884 -0.2024503049 -0.0184563118 [6] -0.1293467176 0.0173929064 -0.3313230372 -0.1965282902 -0.5481982944 [11] 0.1004006224 0.5291689166 -0.0777914736 0.0147526035 0.0305214570 [16] -0.0455416193 -0.0505532773 -0.0453603393 -0.0849644607 0.0391354834 [21] 0.0457539494 0.0007577570 -0.1431374680 -0.1217842742 -0.0876588228 [26] 0.0016378136 0.1172317749 -0.0400986250 0.1251908044 -0.1553758797 [31] 0.0308760110 -0.0483109589 -0.0003966754 0.0654553433 0.0303134047 [36] -0.1601130926 -0.0210010075 -0.1926383818 -0.1477690737 -0.0620384537 [41] -0.0794610428 0.0549543297 -0.0070035094 -0.0525177545 0.0016141815 [46] -0.0344909421 -0.0193742945 -0.1160860834 0.0376523431 0.0756349604 [51] 0.0366117781 -0.0108990470 -0.0346522002 0.0066934033 0.0157272096 [56] -0.0256726250 -0.0270190068 0.0081075687 -0.0316864420 > 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/3yusf1228322263.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/4542q1228322263.tab") > > system("convert tmp/1hmbk1228322263.ps tmp/1hmbk1228322263.png") > system("convert tmp/2stkv1228322263.ps tmp/2stkv1228322263.png") > > > proc.time() user system elapsed 0.593 0.318 0.698