R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(0.63,0.63,0.63,0.64,0.63,0.63,0.63,0.63,0.63,0.64,0.65,0.65,0.65,0.65,0.65,0.66,0.65,0.66,0.66,0.66,0.66,0.68,0.69,0.7,0.71,0.71,0.7,0.7,0.7,0.7,0.71,0.7,0.7,0.7,0.69,0.7,0.69,0.69,0.69,0.7,0.7,0.71,0.71,0.71,0.72,0.73,0.74,0.74,0.74,0.74,0.75,0.75,0.76,0.76,0.76,0.76,0.76,0.77,0.77,0.78,0.78,0.78,0.78,0.78,0.78,0.78,0.8,0.8,0.8,0.81,0.81,0.81,0.8,0.81,0.81,0.81,0.8,0.82,0.83,0.83) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '48' > #'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/1gzat1244369868.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/2parc1244369868.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.000000e+00 -1.388154e-01 5.581680e-02 -6.072305e-02 5.053748e-03 [6] -1.049748e-01 -5.256331e-02 8.792219e-02 -5.603370e-02 3.030513e-02 [11] -2.353094e-01 9.468944e-02 6.588091e-02 -1.524410e-01 2.197187e-02 [16] -5.412932e-02 -6.271853e-02 -1.388197e-01 1.031051e-01 -1.964368e-01 [21] 1.537814e-01 1.016823e-02 9.650706e-02 -2.688680e-02 3.237869e-02 [26] 5.771683e-02 -1.403857e-01 1.286125e-01 -2.870876e-02 1.049227e-01 [31] -4.554446e-02 1.301394e-05 2.535116e-02 -5.760405e-02 2.188077e-02 [36] -4.736641e-02 1.945584e-01 -7.791013e-02 8.279470e-02 -4.059916e-02 [41] -6.940769e-02 -1.115815e-01 7.619663e-02 -6.758574e-03 -8.493766e-03 [46] 1.117724e-01 -1.065495e-01 2.708201e-02 -1.726516e-03 > (mypacf <- c(rpacf$acf)) [1] -0.1388153842 0.0372651767 -0.0491036732 -0.0117505744 -0.1036198699 [6] -0.0854339348 0.0795601745 -0.0413478863 0.0017152847 -0.2427414152 [11] 0.0156804384 0.1239362982 -0.1769336872 -0.0433813494 -0.0917026034 [16] -0.1247762870 -0.1123891068 0.0001672888 -0.2661241206 0.0239687557 [21] 0.0266282123 0.0660345542 -0.1243383714 -0.0330795903 0.0623541375 [26] -0.1982330076 0.0557578701 0.0259622814 -0.0810248777 0.0142965373 [31] 0.0119645367 -0.0859028197 -0.0823400518 -0.0135142415 -0.0143571080 [36] 0.0685691769 0.0827280750 0.1057602806 -0.0462146660 -0.0564363118 [41] -0.0569212892 0.0422642077 -0.0120214506 0.0608323713 0.0825115626 [46] -0.0093484158 0.0260456893 0.0895210154 > 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/35v1s1244369868.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/42dym1244369868.tab") > > system("convert tmp/1gzat1244369868.ps tmp/1gzat1244369868.png") > system("convert tmp/2parc1244369868.ps tmp/2parc1244369868.png") > > > proc.time() user system elapsed 0.575 0.331 0.736