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(492865,480961,461935,456608,441977,439148,488180,520564,501492,485025,464196,460170,467037,460070,447988,442867,436087,431328,484015,509673,512927,502831,470984,471067,476049,474605,470439,461251,454724,455626,516847,525192,522975,518585,509239,512238,519164,517009,509933,509127,500857,506971,569323,579714,577992,565464,547344,554788,562325,560854,555332,543599,536662,542722,593530,610763,612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799) > 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/1zhmt1229596768.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/2ny131229596768.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.936336246 0.836209953 0.751023563 0.699901623 [6] 0.683796651 0.661251766 0.623658896 0.586682642 0.578971872 [11] 0.605411519 0.645517457 0.655227258 0.578489727 0.475585298 [16] 0.381279667 0.314134026 0.278617260 0.238150750 0.189285607 [21] 0.142626654 0.125281799 0.141570715 0.168110783 0.165479896 [26] 0.094101153 0.008535907 -0.065503666 -0.119191908 -0.148479121 [31] -0.184042241 -0.223279591 -0.259687552 -0.273580414 -0.254780023 [36] -0.225229577 -0.218951427 -0.261758000 -0.316596098 -0.364758013 [41] -0.392421224 -0.401195394 -0.412623843 -0.422611061 -0.431297773 [46] -0.421869440 -0.386080912 -0.345769675 -0.323187431 -0.333022488 [51] -0.351195645 -0.366967032 -0.372406505 -0.366926166 -0.364470541 [56] -0.358251576 -0.348102094 -0.325909322 -0.285920066 -0.244909957 [61] -0.215508351 > (mypacf <- c(rpacf$acf)) [1] 0.936336246 -0.328661929 0.167829766 0.153717102 0.161431475 [6] -0.165336554 0.018314298 0.093536905 0.241080647 0.119560975 [11] 0.090206596 -0.171042226 -0.575022745 0.105669149 -0.148374662 [16] -0.051184592 -0.029120396 0.022482090 0.008163259 -0.053397115 [21] 0.111653471 -0.029039033 -0.016552170 -0.093622860 -0.113893979 [26] 0.110454068 -0.028643668 -0.066437732 -0.023942430 0.020970243 [31] -0.006570590 -0.095935032 -0.048940752 0.036945415 0.004734276 [36] -0.013554820 0.049751146 -0.042965293 -0.037511674 0.062082979 [41] -0.055818981 0.079658275 0.019534869 0.001219064 -0.015871643 [46] -0.001083380 -0.020422125 -0.010178832 0.064535142 -0.019370529 [51] -0.015044300 -0.046090147 -0.008786251 -0.052243519 0.009173348 [56] 0.051592877 -0.080312304 -0.017640941 0.016675615 0.058464685 > 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/3bto61229596768.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/4z2nr1229596769.tab") > > system("convert tmp/1zhmt1229596768.ps tmp/1zhmt1229596768.png") > system("convert tmp/2ny131229596768.ps tmp/2ny131229596768.png") > > > proc.time() user system elapsed 0.602 0.316 1.186