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(284.4,212.8,226.9,308.4,262,227.9,236.1,320.4,271.9,232.8,237,313.4,261.4,226.8,249.9,314.3,286.1,226.5,260.4,311.4,294.7,232.6,257.2,339.2,279.1,249.8,269.8,345.7,293.8,254.7,277.5,363.4,313.4,272.8,300.1,369.5,330.8,287.8,305.9,386.1,335.2,288,308.3,402.3,352.8,316.1,324.9,404.8,393,318.9,327,442.3,383.1,331.6,361.4,445.9,386.6,357.2,373.6,466.2,409.6,369.8,378.6,487,419.2,376.7,392.8,506.1,458.4,387.4,426.9,565,464.8,444.5,449.5,556.1,499.6,451.9,434.9,553.8,510,432.9,453.2,547.6,485.8,452.6,456.6,565.7,514.8,464.3,430.9,588.3,503.1,442.6,448,554.5,504.5,427.3,473.1,526.2,547.5,440.2,468.7,574.5,492.6,432.6,479.8,575.7,474.6,405.3,434.6,535.1,452.6,429.5,417.2,551.8,464,416.6,422.9,553.6,458.6,427.6,429.2,534.2,481.7,416,440.2,538.7,473.8,439.9,446.8,597.5,467.2,439.4,447.4,568.5,485.9,442.1,430.5,600,464.5,423.6,437,574,443,410,420,532,432,420,411,512,449,382) > par5 = '12' > par4 = '0' > par3 = '0' > 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/freestat/rcomp/tmp/1pgut1229035813.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/freestat/rcomp/tmp/2aogz1229035813.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.740668232 0.586106619 0.720226650 0.940319756 [6] 0.699288085 0.540801893 0.671855935 0.881821437 0.651001946 [11] 0.488324935 0.619551756 0.818944591 0.587545053 0.429329295 [16] 0.558863393 0.742928973 0.519643326 0.368612192 0.486701163 [21] 0.667374382 0.449872640 0.297123109 0.417570948 0.589526524 [26] 0.376506088 0.231464155 0.345921885 0.514874395 0.305887828 [31] 0.163571714 0.274278800 0.434606289 0.236975965 0.093311752 [36] 0.204775238 0.359112382 0.167232557 0.027002158 0.138571923 [41] 0.284652094 0.097448228 -0.035308059 0.070577864 0.210603153 [46] 0.031578758 -0.094920120 0.003662068 0.141479034 > (mypacf <- c(rpacf$acf)) [1] 0.7406682322 0.0831110118 0.5814011838 0.8022941610 -0.4655923522 [6] -0.1709963695 0.0265603505 0.1877382282 -0.1335725427 -0.1048863298 [11] 0.0317884974 0.0371383675 -0.1896289809 0.0358473876 0.0124986417 [16] -0.0900937425 -0.0223318157 0.0806530975 -0.1516013871 0.0443019157 [21] 0.0012584829 -0.0820917958 0.0322554617 -0.0007225887 -0.0283192556 [26] 0.0230117901 -0.0737727599 0.0920753142 -0.0804560570 -0.0484324433 [31] 0.0369608697 -0.0946181171 0.0579006763 -0.0261629054 -0.0220692915 [36] 0.0019106005 -0.0211087699 -0.0284340841 0.0382056726 -0.0560079985 [41] -0.0561933821 0.0834184888 -0.0936342931 -0.0301385209 0.0593633555 [46] -0.0249156950 -0.0655918695 0.0119361628 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3l3311229035813.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/freestat/rcomp/tmp/4exuj1229035813.tab") > > system("convert tmp/1pgut1229035813.ps tmp/1pgut1229035813.png") > system("convert tmp/2aogz1229035813.ps tmp/2aogz1229035813.png") > > > proc.time() user system elapsed 0.822 0.435 0.935