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(6340.5,7901.5,8191.1,7181.7,7594.4,7384.7,7876.7,8463.4,8317.2,7778.7,8532.8,7272.2,6680.1,8427.6,8752.8,7952.7,8694.3,7787,8474.2,9154.7,8557.2,7951.1,9156.7,7865.7,7337.4,9131.7,8814.6,8598.8,8439.6,7451.8,8016.2,9544.1,8270.7,8102.2,9369,7657.7,7816.6,9391.3,9445.4,9533.1,10068.7,8955.5,10423.9,11617.2,9391.1,10872,10230.4,9221,9428.6,10934.5,10986,11724.6,11180.9,11163.2,11240.9,12107.1,10762.3,11340.4,11266.8,9542.7,9227.7,10571.9,10774.4,10392.8,9920.2,9884.9,10174.5,11395.4,10760.2,10570.1,10536,9902.6,8889,10837.3,11624.1,10509,10984.9,10649.1,10855.7,11677.4,10760.2,10046.2,10772.8,9987.7,8638.7,11063.7,11855.7,10684.5,11337.4,10478,11123.9,12909.3,11339.9,10462.2,12733.5,10519.2,10414.9,12476.8,12384.6,12266.7,12919.9,11497.3,12142,13919.4,12656.8,12034.1,13199.7,10881.3,11301.2,13643.9,12517,13981.1,14275.7,13435,13565.7,16216.3,12970,14079.9,14235,12213.4,12581) > par5 = '12' > par4 = '1' > 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/1ok5k1229253392.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/2eynw1229253392.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.593563075 0.168326959 0.123802096 -0.108331899 [6] -0.075854998 0.269170854 -0.335192253 0.109093273 0.201696007 [11] -0.276121455 0.142755348 -0.026105210 -0.144179786 0.042753207 [16] 0.089937374 -0.203998617 0.112381441 0.146696665 -0.260818030 [21] 0.192590066 -0.011154885 -0.218467876 0.250539024 -0.138893259 [26] -0.099268935 0.258357669 -0.120757636 -0.086728089 0.241970870 [31] -0.234759747 0.065182362 0.044614207 -0.069362330 -0.018181468 [36] 0.186987024 -0.209619292 0.111687742 0.090441145 -0.197829558 [41] 0.068373382 0.093013950 -0.216173751 0.202694835 -0.021108248 [46] -0.140641476 0.154269240 -0.002870668 -0.198751028 0.249581509 [51] -0.228796567 0.090839212 0.062885254 -0.053296138 -0.020216971 [56] 0.104260449 -0.080676012 0.004581252 0.040967048 -0.072824813 [61] 0.076943517 > (mypacf <- c(rpacf$acf)) [1] -0.593563075 -0.284074464 0.140206667 0.161291345 -0.150623389 [6] 0.136629886 -0.094890806 -0.229426542 0.192746013 0.110919302 [11] -0.026737950 -0.190899333 -0.210144901 -0.248267356 -0.036194019 [16] 0.123004843 -0.037353466 0.197484934 -0.016194731 -0.175075567 [21] -0.024359208 -0.147999508 0.051425307 -0.076762685 -0.155175314 [26] 0.013316866 0.032556797 0.018962675 0.028275638 0.001798755 [31] -0.013485610 -0.208783104 -0.003535307 0.007941397 0.101124923 [36] -0.067797826 -0.144582785 0.101561229 -0.026178006 -0.045768308 [41] 0.032109119 -0.070754968 0.049416601 -0.137419117 -0.018545408 [46] -0.052160642 -0.000561724 -0.024555450 -0.015534762 -0.057006192 [51] 0.008004676 -0.032160433 -0.009980645 0.048186002 -0.008153864 [56] -0.082211603 0.035775385 -0.033379772 -0.025726261 0.104272686 > 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/361bm1229253392.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/4gak41229253392.tab") > > system("convert tmp/1ok5k1229253392.ps tmp/1ok5k1229253392.png") > system("convert tmp/2eynw1229253392.ps tmp/2eynw1229253392.png") > > > proc.time() user system elapsed 0.615 0.339 0.961