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(90.2 + ,90 + ,88.8 + ,85.8 + ,84.2 + ,80 + ,77.8 + ,76.8 + ,86.4 + ,89.2 + ,86.2 + ,84.6 + ,83.2 + ,83.2 + ,82.6 + ,79.8 + ,77.2 + ,74.8 + ,73 + ,73 + ,83.6 + ,85.6 + ,84.8 + ,84.2 + ,83.4 + ,84.6 + ,84.6 + ,83.8 + ,81.2 + ,79.6 + ,78 + ,78.2 + ,88.8 + ,92 + ,91 + ,91.2 + ,90.4 + ,91.8 + ,92.2 + ,90.2 + ,88.6 + ,87.8 + ,86 + ,87.2 + ,97.6 + ,101.2 + ,100.4 + ,100.2 + ,100.2 + ,103 + ,104.2 + ,104 + ,102.4 + ,101.8 + ,101 + ,102.2 + ,114 + ,118.4 + ,118.8 + ,117.2 + ,117.2 + ,118.4 + ,118.8 + ,117.2 + ,114.4 + ,112.6 + ,111 + ,110.8 + ,120.2 + ,124.4 + ,123.4 + ,121.2 + ,119 + ,119.8 + ,120 + ,118.4 + ,115 + ,113.4 + ,111 + ,111 + ,121.6 + ,126.2 + ,125.8 + ,124.8 + ,122 + ,123.2 + ,124.2 + ,120.8 + ,116.8 + ,114.8 + ,111 + ,109 + ,119.8 + ,124 + ,121.6 + ,118 + ,115.8 + ,116 + ,115.8 + ,114.4 + ,112 + ,110.2 + ,107.4 + ,108.2 + ,117.6 + ,121.4 + ,119.8 + ,115.6 + ,112.6 + ,113.2 + ,112.2 + ,110.8 + ,108 + ,105.2 + ,102.4 + ,101 + ,110.8 + ,116.8 + ,113.8 + ,108 + ,104.4 + ,105.2 + ,105.4 + ,103.2 + ,100.6 + ,97.8 + ,95.8 + ,95 + ,104.8 + ,110.4 + ,106.4 + ,102.2 + ,98.4 + ,98.4 + ,98.6 + ,96.2 + ,92.4 + ,91.4 + ,88.4 + ,87.8 + ,97.6 + ,104.2 + ,100.2 + ,97 + ,92.8 + ,92 + ,93.4 + ,92 + ,89.6 + ,88.6 + ,87.2 + ,86.2 + ,96.8 + ,102 + ,102.6 + ,100.6 + ,94.2 + ,94.2 + ,95.2 + ,95 + ,94 + ,92.2 + ,91 + ,91.2 + ,103.4 + ,105 + ,104.6 + ,103.8 + ,101.8 + ,102.4 + ,103.8 + ,103.4 + ,102 + ,101.8 + ,100.2 + ,101.4 + ,113.8 + ,116 + ,115.6 + ,113 + ,109.4 + ,111 + ,112.4 + ,112.2 + ,111 + ,108.8 + ,107.4 + ,108.6 + ,118.8 + ,122.2 + ,122.6 + ,122.2 + ,118.8 + ,119 + ,118.2 + ,117.8 + ,116.8 + ,114.6 + ,113.4 + ,113.8 + ,124.2 + ,125.8 + ,125.6 + ,122.4 + ,119 + ,119.4 + ,118.6 + ,118 + ,116 + ,114.8 + ,114.6 + ,114.6 + ,124 + ,125.2 + ,124 + ,117.6 + ,113.2 + ,111.4 + ,112.2 + ,109.8 + ,106.4 + ,105.2 + ,102.2 + ,99.8 + ,111 + ,113 + ,108.4 + ,105.4 + ,102 + ,102.8 + ,103.4 + ,101.6 + ,98.6 + ,98 + ,93.8 + ,95.6 + ,105.6 + ,106.8 + ,103.6 + ,101.2 + ,100.4 + ,103.2 + ,105.6 + ,106.6 + ,107.2 + ,107.4 + ,104.8 + ,107.2 + ,117.4 + ,119.4 + ,116.2 + ,112.8 + ,111.6) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1c8gw1261302838.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2gp9u1261302838.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.0000000000 0.9550692383 0.8830927339 0.8286533635 0.7990379298 [6] 0.7893528354 0.7768432945 0.7509980534 0.7211794375 0.7140511666 [11] 0.7328634171 0.7694562396 0.7799840641 0.7152471706 0.6263236243 [16] 0.5544457964 0.5085675387 0.4837134596 0.4580341438 0.4211047498 [21] 0.3811768476 0.3640098447 0.3712955172 0.3956913077 0.3947857529 [26] 0.3242220009 0.2316321770 0.1566200944 0.1088188795 0.0824127492 [31] 0.0565611703 0.0205702086 -0.0174341419 -0.0331220336 -0.0247272809 [36] -0.0006797709 0.0008904104 -0.0628729252 -0.1480593593 -0.2167560620 [41] -0.2571680061 -0.2759402459 -0.2927242540 -0.3187096837 -0.3460894167 [46] -0.3517730178 -0.3348380693 -0.3025217256 -0.2911980579 -0.3405915012 [51] -0.4092024612 -0.4602544880 -0.4833586060 -0.4853995759 -0.4841268861 [56] -0.4918567730 -0.5010096689 -0.4899357959 -0.4579005250 -0.4109798921 [61] -0.3847427030 > (mypacf <- c(rpacf$acf)) [1] 0.955069238 -0.330869832 0.283559494 0.106651513 0.153903544 [6] -0.088825500 -0.012946354 0.043714960 0.284145313 0.123037211 [11] 0.243895184 -0.334360401 -0.737170418 0.046703172 -0.029508431 [16] 0.052571477 0.100072597 0.004471487 0.089159915 0.002571215 [21] -0.052490736 -0.099522183 -0.008027982 -0.060743067 -0.230770416 [26] 0.032859553 0.026180974 0.047124991 0.045623273 -0.028109488 [31] 0.006453877 -0.009246217 -0.069488232 -0.019928008 -0.058501952 [36] 0.107228224 -0.130587992 -0.007854610 -0.052605429 0.024414242 [41] 0.002070504 0.000751241 -0.016714672 0.040015457 -0.033655473 [46] -0.018513532 -0.021128714 0.020171623 -0.027898763 0.069428353 [51] 0.046131905 -0.008751939 0.001217981 0.020007077 -0.057451415 [56] 0.026939487 -0.065469913 0.032163888 0.034570440 0.009913733 > 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/32bgu1261302839.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/4z1pi1261302839.tab") > > try(system("convert tmp/1c8gw1261302838.ps tmp/1c8gw1261302838.png",intern=TRUE)) character(0) > try(system("convert tmp/2gp9u1261302838.ps tmp/2gp9u1261302838.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.602 0.303 0.771