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,574205,572775,572942,619567,625809,619916,587625,565742,557274,560576,548854,531673,525919,511038,498662,555362,564591,541657,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590) > 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/1uevt1229613249.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/2waxj1229613249.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.269299539 -0.181078131 -0.284281100 -0.295945951 [6] 0.020507735 0.182227534 0.038336271 -0.262735895 -0.256025749 [11] -0.177627305 0.264885033 0.798690050 0.193794444 -0.123225370 [16] -0.261858880 -0.270442213 0.011670914 0.135360774 0.014718239 [21] -0.257827924 -0.243241123 -0.126283032 0.242617427 0.648855657 [26] 0.129981758 -0.141954496 -0.233595036 -0.214489133 0.021967802 [31] 0.097526038 -0.006769833 -0.237344423 -0.204952258 -0.112076754 [36] 0.204712079 0.567599688 0.121506572 -0.127630286 -0.237993675 [41] -0.190891125 0.006954966 0.087538660 -0.000965487 -0.209320645 [46] -0.169098985 -0.096321939 0.165976476 0.469297792 0.104730357 [51] -0.110504169 -0.183713940 -0.151496223 -0.018348233 0.078173221 [56] -0.005756523 -0.165655807 -0.118815749 -0.081560671 0.151993179 [61] 0.390931458 > (mypacf <- c(rpacf$acf)) [1] 0.269299539 -0.273430139 -0.173106191 -0.245137049 0.086208840 [6] 0.008566154 -0.117763737 -0.330292379 -0.122176870 -0.255943150 [11] 0.219667057 0.665719603 -0.188870600 0.183135061 0.008093849 [16] 0.087377717 -0.036226406 -0.088015780 -0.043942143 -0.108023959 [21] -0.061365135 0.065610150 -0.146453673 0.086108823 -0.127984592 [26] -0.124922025 0.067118070 -0.051528085 0.009465502 -0.081824078 [31] -0.009191925 0.077470809 -0.039219267 -0.082022780 -0.031308932 [36] 0.066193411 0.095706485 -0.053652382 -0.101599910 0.038279770 [41] -0.115105073 0.061091601 -0.096429943 -0.033992081 0.012177447 [46] -0.050951604 -0.055008455 -0.058497319 -0.063014252 -0.018629172 [51] 0.014844183 -0.012068358 -0.010988067 -0.007695242 -0.026206005 [56] 0.038981694 0.013640459 -0.021845566 0.032837394 -0.076192621 > 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/3ajjl1229613249.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/4tkgp1229613249.tab") > > system("convert tmp/1uevt1229613249.ps tmp/1uevt1229613249.png") > system("convert tmp/2waxj1229613249.ps tmp/2waxj1229613249.png") > > > proc.time() user system elapsed 0.653 0.353 0.803