R version 2.12.1 (2010-12-16) Copyright (C) 2010 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) > par2 = '12' > par1 = 'multiplicative' > #'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!) > par2 <- as.numeric(par2) > x <- ts(x,freq=par2) > m <- decompose(x,type=par1) > m$figure [1] 1.0442983 1.0592135 0.7959061 0.7938367 0.9129903 0.8787976 1.0388530 [8] 1.4327380 1.1068990 0.9832569 0.8200391 1.1331716 > postscript(file="/var/www/rcomp/tmp/14yk01322666120.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > mylagmax <- length(x)/2 > postscript(file="/var/www/rcomp/tmp/2xgwg1322666120.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > acf(as.numeric(x),lag.max = mylagmax,main='Observed') > acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend') > acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal') > acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random') > par(op) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3g8n91322666120.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > spectrum(as.numeric(x),main='Observed') > spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend') > spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal') > spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random') > par(op) > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4dzbj1322666120.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow = c(2,2)) > cpgram(as.numeric(x),main='Observed') > cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend') > cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal') > cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random') > par(op) > dev.off() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'t',header=TRUE) > a<-table.element(a,'Observations',header=TRUE) > a<-table.element(a,'Fit',header=TRUE) > a<-table.element(a,'Trend',header=TRUE) > a<-table.element(a,'Seasonal',header=TRUE) > a<-table.element(a,'Random',header=TRUE) > a<-table.row.end(a) > for (i in 1:length(m$trend)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,x[i]) + if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i]) + a<-table.element(a,m$trend[i]) + a<-table.element(a,m$seasonal[i]) + a<-table.element(a,m$random[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/5czks1322666120.tab") > > try(system("convert tmp/14yk01322666120.ps tmp/14yk01322666120.png",intern=TRUE)) character(0) > try(system("convert tmp/2xgwg1322666120.ps tmp/2xgwg1322666120.png",intern=TRUE)) character(0) > try(system("convert tmp/3g8n91322666120.ps tmp/3g8n91322666120.png",intern=TRUE)) character(0) > try(system("convert tmp/4dzbj1322666120.ps tmp/4dzbj1322666120.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 6.280 0.312 6.573