R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(1149822 + ,1086979 + ,1276674 + ,1522522 + ,1742117 + ,1737275 + ,1979900 + ,2061036 + ,1867943 + ,1707752 + ,1298756 + ,1281814 + ,1281151 + ,1164976 + ,1454329 + ,1645288 + ,1817743 + ,1895785 + ,2236311 + ,2295951 + ,2087315 + ,1980891 + ,1465446 + ,1445026 + ,1488120 + ,1338333 + ,1715789 + ,1806090 + ,2083316 + ,2092278 + ,2430800 + ,2424894 + ,2299016 + ,2130688 + ,1652221 + ,1608162 + ,1647074 + ,1479691 + ,1884978 + ,2007898 + ,2208954 + ,2217164 + ,2534291 + ,2560312 + ,2429069 + ,2315077 + ,1799608 + ,1772590 + ,1744799 + ,1659093 + ,2099821 + ,2135736 + ,2427894 + ,2468882 + ,2703217 + ,2766841 + ,2655236 + ,2550373 + ,2052097 + ,1998055 + ,1920748 + ,1876694 + ,2380930 + ,2467402 + ,2770771 + ,2781340 + ,3143926 + ,3172235 + ,2952540 + ,2920877 + ,2384552 + ,2248987 + ,2208616 + ,2178756 + ,2632870 + ,2706905 + ,3029745 + ,3015402 + ,3391414 + ,3507805 + ,3177852 + ,3142961 + ,2545815 + ,2414007 + ,2372578 + ,2332664 + ,2825328 + ,2901478 + ,3263955 + ,3226738 + ,3610786 + ,3709274 + ,3467185 + ,3449646 + ,2802951 + ,2462530 + ,2490645 + ,2561520 + ,3067554 + ,3226951 + ,3546493 + ,3492787 + ,3952263 + ,3932072 + ,3720284 + ,3651555 + ,2914972 + ,2713514 + ,2703997 + ,2591373 + ,3163748 + ,3355137 + ,3613702 + ,3686773 + ,4098716 + ,4063517 + ,3551489 + ,3226663 + ,2656842 + ,2597484 + ,2572399 + ,2596631 + ,3165225 + ,3303145 + ,3698247 + ,3668631 + ,4130433 + ,4131400 + ,3864358 + ,3721110 + ,2892532 + ,2843451 + ,2747502 + ,2668775 + ,3018602 + ,3013392 + ,3393657 + ,3544233 + ,4075832 + ,4032923 + ,3734509 + ,3761285 + ,2970090 + ,2847849 + ,2741680 + ,2830639 + ,3257673 + ,3480085 + ,3843271 + ,3796961 + ,4337767 + ,4243630 + ,3927202 + ,3915296 + ,3087396 + ,2963792 + ,2955792 + ,2829925 + ,3281195 + ,3548011 + ,4059648 + ,3941175 + ,4528594 + ,4433151 + ,4145737 + ,4077132 + ,3198519 + ,3078660 + ,3028202 + ,2858642 + ,3398954 + ,3808883 + ,4175961 + ,4227542 + ,4744616 + ,4608012 + ,4295049 + ,4201144 + ,3353276 + ,3286851 + ,3169889 + ,3051720 + ,3695426 + ,3905501 + ,4296458 + ,4246247 + ,4921849 + ,4821446 + ,4425064 + ,4379099 + ,3472889 + ,3359160 + ,3200944 + ,3153170 + ,3741498 + ,3918719 + ,4403449 + ,4400407 + ,4847473 + ,4716136 + ,4297440 + ,4272253 + ,3271834 + ,3168388 + ,2911748 + ,2720999 + ,3199918 + ,3672623 + ,3892013 + ,3850845 + ,4532467 + ,4484739 + ,4014972 + ,3983758 + ,3158459 + ,3100569 + ,2935404 + ,2855719 + ,3465611 + ,3006985 + ,4095110 + ,4104793 + ,4730788 + ,4642726 + ,4246919 + ,4308117) > par8 = '' > 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: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #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 (par8 != '') par8 <- as.numeric(par8) > ox <- x > if (par8 == '') { + if (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } + } else { + x <- log(x,base=par8) + } > if (par3 > 0) x <- diff(x,lag=1,difference=par3) > if (par4 > 0) x <- diff(x,lag=par5,difference=par4) > postscript(file="/var/wessaorg/rcomp/tmp/1zgvi1324394877.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,1)) > plot(ox,type='l',main='Original Time Series',xlab='time',ylab='value') > if (par8=='') { + mytitle <- paste('Working Time Series (lambda=',par2,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } else { + mytitle <- paste('Working Time Series (base=',par8,', d=',par3,', D=',par4,')',sep='') + mysub <- paste('(base=',par8,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='') + } > plot(x,type='l', main=mytitle,xlab='time',ylab='value') > par(op) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/2gw5k1324394877.ps",horizontal=F,onefile=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=mysub) > dev.off() null device 1 > postscript(file="/var/wessaorg/rcomp/tmp/3jd1g1324394877.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF',sub=mysub) > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.000000000 0.920646216 0.821320624 0.678377808 0.533131804 [6] 0.448856221 0.394473004 0.433899395 0.502352245 0.627671271 [11] 0.747451569 0.821584730 0.870886217 0.801802703 0.707815205 [16] 0.573484757 0.434765864 0.353529311 0.301867693 0.335225493 [21] 0.400591742 0.519914634 0.633383358 0.702414792 0.748796788 [26] 0.682111658 0.593185351 0.466047790 0.334606363 0.255673068 [31] 0.204209542 0.234510223 0.292466874 0.401758073 0.506670933 [36] 0.569298015 0.609844835 0.545460647 0.459921044 0.339348185 [41] 0.216165384 0.141531615 0.092659431 0.119473213 0.172505238 [46] 0.274423620 0.371248027 0.429579923 0.466719888 0.407282191 [51] 0.326582893 0.213344774 0.097871597 0.027556107 -0.016770783 [56] 0.008638204 0.058754979 0.154588415 0.245645537 0.299627898 [61] 0.335048513 > (mypacf <- c(rpacf$acf)) [1] 0.9206462157 -0.1723557267 -0.3341515087 -0.0533582397 0.4418500824 [6] 0.1154292629 0.4059702527 0.0721637384 0.4339486218 0.0722196145 [11] 0.0042176862 0.1106793957 -0.4240576181 -0.0686648329 -0.0044867099 [16] -0.0829099704 0.0348113982 -0.0263622192 -0.0403659190 0.0209250743 [21] 0.1472003494 -0.0052353641 -0.0027987143 0.0974193706 -0.2205057437 [26] 0.0256875837 0.0207350564 -0.0120593023 -0.0347676431 -0.0334558658 [31] -0.0365986834 -0.0496727110 0.0199128262 0.0078560639 -0.0083327066 [36] 0.0087461735 -0.1046352190 0.0008636697 0.0267772831 0.0416234583 [41] -0.0311391232 -0.0227064191 -0.0392057811 -0.0244826867 0.0149198280 [46] -0.0081297396 0.0189045833 -0.0062069686 -0.0499636237 -0.0299102834 [51] 0.0164765772 0.0146632910 -0.0011183002 0.0135254876 -0.0385939157 [56] -0.0167936387 0.0059452548 0.0017469948 -0.0017496100 0.0321219532 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/4y26c1324394878.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/wessaorg/rcomp/tmp/5vorn1324394878.tab") > > try(system("convert tmp/1zgvi1324394877.ps tmp/1zgvi1324394877.png",intern=TRUE)) character(0) > try(system("convert tmp/2gw5k1324394877.ps tmp/2gw5k1324394877.png",intern=TRUE)) character(0) > try(system("convert tmp/3jd1g1324394877.ps tmp/3jd1g1324394877.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.006 0.270 1.273