R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(721.8,836.7,817.8,804.3,773.3,789.6,882.5,868.9,885.7,880.6,846.2,875.4,799.6,946.3,987.3,892.4,885.1,937.1,935.9,944.2,930.9,874.0,891.9,902.2,767.0,912.5,918.6,713.4,849.9,875.9,1010.9,1049.2,900.5,1111.6,898.2,1034.3,996.7,1188.9,1092.5,952.0,959.1,846.1,903.0,1089.5,879.9,1057.0,932.6,745.5,817.2,808.3,832.9,801.2,773.1,710.8,820.4,814.9,833.5,864.3,844.9,733.6) > 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/1u8ak1196245518.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/27lbk1196245518.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.465111192 0.430662782 0.358433420 0.220381059 [6] 0.330587611 0.244520967 0.197854871 0.088027401 -0.113330821 [11] -0.156789284 -0.171197289 0.028829804 -0.194652935 -0.250233940 [16] -0.158406307 -0.309211362 -0.117800420 -0.174969350 -0.131848270 [21] -0.035299149 -0.162441302 -0.115544113 0.009852862 0.066333995 [26] 0.001920976 -0.052587837 -0.020183552 -0.111109690 -0.051581611 [31] -0.114315892 -0.116078823 -0.070298862 -0.281480270 -0.187939895 [36] -0.151123553 -0.142138901 -0.128051593 -0.128072616 -0.101125310 [41] -0.091794994 -0.047539124 -0.032156307 -0.022943999 0.036629294 [46] -0.014839816 0.045070874 0.123902460 0.102227447 0.108194125 [51] 0.086106657 0.086199123 0.081936516 0.081394145 0.066042702 [56] 0.061269967 0.042305448 0.027334397 0.024299685 0.041657410 > (mypacf <- c(rpacf$acf)) [1] 0.465111192 0.273500235 0.118202817 -0.062538113 0.200268970 [6] 0.025838033 -0.030766188 -0.150351038 -0.262968008 -0.170255242 [11] -0.040494450 0.324479655 -0.239123763 -0.201676124 0.194890099 [16] 0.018406112 0.073759972 -0.160516660 -0.029569610 0.101288739 [21] 0.062773832 -0.096128822 0.034142061 0.038375161 -0.081150375 [26] -0.093838515 -0.136249934 -0.077550571 -0.053384610 -0.099135108 [31] -0.048275328 -0.024999079 -0.087963348 0.115896085 -0.024886010 [36] -0.022709528 -0.007845274 0.094856394 -0.014842448 -0.081893098 [41] -0.008946893 -0.022841466 -0.144960281 -0.122753677 0.144345398 [46] -0.058878197 -0.032486892 0.038138594 -0.034914255 0.040000964 [51] -0.021420282 -0.058739828 -0.037638346 0.002972506 0.010240275 [56] 0.030046963 0.033545850 -0.031746254 -0.044988562 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3juxc1196245518.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/49bcj1196245518.tab") > > system("convert tmp/1u8ak1196245518.ps tmp/1u8ak1196245518.png") > system("convert tmp/27lbk1196245518.ps tmp/27lbk1196245518.png") > > > proc.time() user system elapsed 0.912 0.335 1.082