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(1483509 + ,8036554 + ,4623093 + ,5528662 + ,4221032 + ,8061847 + ,7640066 + ,2935533 + ,8161548 + ,2543967 + ,13163450 + ,3348436 + ,3997440 + ,2322911 + ,2019457 + ,3047748 + ,5728767 + ,2605173 + ,5646743 + ,13121544 + ,3453409 + ,1878333 + ,4247362 + ,23022552 + ,7646203 + ,9016602 + ,3606568 + ,3173510 + ,17568772 + ,10805045 + ,31056269 + ,15623385 + ,6663443 + ,35435745 + ,2823250 + ,5197089 + ,4120632 + ,8832767 + ,3695374 + ,8385805 + ,3777904 + ,5199532 + ,5297275 + ,14847382 + ,5900158 + ,4416718 + ,3926429 + ,4876884 + ,2795297 + ,3385527 + ,3877941 + ,3556729 + ,4982836 + ,2976325 + ,2295026 + ,2218752 + ,4146062 + ,3302091 + ,3864505 + ,5454794 + ,1749836 + ,6684048 + ,2809918 + ,4092664 + ,5070470 + ,9814477 + ,6665318 + ,3912554 + ,6188129 + ,3627991 + ,3308767 + ,3820332 + ,4932979 + ,5567917 + ,5020814 + ,3803273 + ,3999984 + ,4883104 + ,13731747 + ,47531824 + ,8415570 + ,22178158 + ,61211654 + ,18223748 + ,17678085 + ,49299580 + ,25899948 + ,34121754 + ,9859231 + ,29740892 + ,21085212 + ,43003866 + ,59549247 + ,18026465 + ,4680597 + ,5564728 + ,11792347 + ,10371624 + ,3728446 + ,5732978 + ,4067638 + ,2395508 + ,5018801 + ,22068888 + ,7678580 + ,15510095 + ,6471239 + ,14349204 + ,35151574 + ,8210488 + ,5022664 + ,13996871 + ,12822431 + ,14011552 + ,20260980 + ,23718976 + ,45833049 + ,30688420 + ,16576062 + ,14844405 + ,16728286 + ,43477680 + ,57497427 + ,24233726 + ,24921208 + ,9516725 + ,27977239 + ,21632046 + ,22956809 + ,9704324 + ,19871149 + ,5553842 + ,5667858 + ,4348188 + ,10025042 + ,10639796 + ,8639184 + ,10764378 + ,12097733 + ,3988414 + ,4607102 + ,7126895 + ,6009625 + ,21533237 + ,5986771 + ,5455310 + ,1822874 + ,3374062 + ,2920748 + ,2295942 + ,6809829 + ,3318281 + ,13784645 + ,7366577 + ,1628637 + ,4258976 + ,7159779 + ,8098401 + ,6894240 + ,3771246 + ,3249726 + ,3147380 + ,4063037 + ,9621916 + ,5890158 + ,2142901 + ,3145007 + ,1562168 + ,3303103 + ,5886910 + ,3454270 + ,6995348 + ,6487869 + ,12091976 + ,3934625 + ,3999749 + ,3613526 + ,4271706 + ,4253390 + ,5551591 + ,4663041 + ,2104104 + ,5385399 + ,6205877 + ,7529500 + ,17222705 + ,6230913 + ,6508275 + ,4518884 + ,4234991 + ,5625388 + ,5810139 + ,6942187 + ,3711188 + ,4261281 + ,1989945 + ,5033342 + ,7239565 + ,11058795 + ,7384772 + ,3884771 + ,3239201 + ,2316403 + ,4034947 + ,3245271 + ,2387251 + ,2174886 + ,3436080 + ,3738956 + ,1884730 + ,1509144 + ,42728366 + ,3446317 + ,4600683 + ,2953615 + ,3570060 + ,2130208 + ,2442943 + ,4892020 + ,3222192 + ,3121617 + ,3665542 + ,5519432 + ,4113468 + ,1714614 + ,3651985 + ,2419548 + ,2378854 + ,2303949 + ,2555534 + ,1713005 + ,1705960 + ,6115046 + ,3951044 + ,3785568 + ,4670530 + ,2265100 + ,1105643 + ,2814152 + ,3728673 + ,2038949 + ,2402919 + ,2348814 + ,2797822 + ,902505 + ,1331319 + ,4204238 + ,2212485 + ,6797382 + ,4532324 + ,1778808 + ,1890720 + ,5463736 + ,11368931 + ,2040164 + ,4276399 + ,3714445 + ,2068168 + ,1003842 + ,2858535 + ,2355484 + ,2719262 + ,1897741 + ,3945185 + ,3799916 + ,1017654 + ,3052241 + ,3932970 + ,3598151 + ,2296005 + ,2202018 + ,2461777 + ,2452042 + ,2185142 + ,11968502 + ,20395972 + ,21756900 + ,30024300 + ,10811344 + ,1819202 + ,1276885 + ,2946701 + ,3587459 + ,2832691 + ,6674805 + ,3868362 + ,4302909 + ,23265229 + ,22348002 + ,11883953 + ,6634979 + ,2935493 + ,3425669 + ,1171611 + ,6875879 + ,19451908 + ,13885933 + ,7643317 + ,10797966 + ,7297445 + ,8739736 + ,12455537 + ,24291181 + ,4215150 + ,28652176 + ,6851172 + ,3746871 + ,7327861 + ,16829710 + ,13778594 + ,6463717 + ,8956867 + ,21204915 + ,16115855 + ,2536113 + ,16645717 + ,17003730 + ,15969006 + ,31020427 + ,23798897 + ,20770321 + ,44410402 + ,27037491 + ,29627771 + ,18189792 + ,4654610 + ,12307201 + ,15300578 + ,10623864 + ,6880178 + ,29947357 + ,18611399 + ,42432604 + ,20208278 + ,14004392 + ,25737765 + ,16735738 + ,22450825 + ,6880840 + ,8510379 + ,8182481 + ,10948683 + ,4805277 + ,2589229 + ,5658407 + ,12862611 + ,5666188 + ,6875556 + ,7098766 + ,36083309 + ,10200330 + ,7784976) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = 'Default' > #'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/10l601322486742.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/2gqli1322486742.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/3v28r1322486742.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.00000000 0.50880736 0.41207215 0.40547432 0.33624140 0.35883962 [7] 0.32708760 0.28740853 0.25150156 0.22353808 0.24397802 0.20939809 [13] 0.17669284 0.22399285 0.21197868 0.08398611 0.07517838 0.09477457 [19] 0.05999075 0.07940885 0.06052302 0.07428833 0.05071742 0.06729011 [25] 0.08458715 0.08467498 > (mypacf <- c(rpacf$acf)) [1] 0.508807361 0.206698295 0.188845648 0.056352507 0.134721000 [6] 0.052849694 0.023998660 -0.008686127 -0.001101507 0.057749160 [11] -0.005605991 -0.017666591 0.084371099 0.038344896 -0.156245784 [16] -0.053821850 0.021948480 -0.027514173 0.014604845 -0.003812049 [21] 0.058115366 -0.009373480 0.027453955 0.023754576 0.049024509 > 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/4yyre1322486742.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/5t82a1322486743.tab") > > try(system("convert tmp/10l601322486742.ps tmp/10l601322486742.png",intern=TRUE)) character(0) > try(system("convert tmp/2gqli1322486742.ps tmp/2gqli1322486742.png",intern=TRUE)) character(0) > try(system("convert tmp/3v28r1322486742.ps tmp/3v28r1322486742.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.018 0.161 1.182