Home » date » 2009 » Dec » 03 »

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 03 Dec 2009 03:47:56 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu.htm/, Retrieved Thu, 03 Dec 2009 11:52:28 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
21790 13253 37702 30364 32609 30212 29965 28352 25814 22414 20506 28806 22228 13971 36845 35338 35022 34777 26887 23970 22780 17351 21382 24561 17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367 31124 26551 30651 25859 25100 25778 20418 18688 20424 24776 19814 12738 31566 30111 30019 31934 25826 26835 20205 17789 20520 22518 15572 11509 25447 24090 27786 26195 20516 22759 19028 16971 20036 22485 18730
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
121790NANA0.780561764222906NA
213253NANA0.525497518289622NA
337702NANA1.30884090175334NA
430364NANA1.21065578495764NA
532609NANA1.3511224494451NA
630212NANA1.23037949903171NA
72996527675.798556791126833.83333333331.031377001302751.08271491926462
82835228831.2778216202268821.072512380835510.98337646272269
92581423439.451078049926876.20833333330.8721264096237491.10130565404639
102241421440.497239870827047.750.7926906023558641.04540485928278
112050623620.221294194127355.54166666670.8634528821257390.868154440409093
122880626562.081684544527646.29166666670.9607828060560681.08447825520999
132222821628.000503529327708.250.7805617642229061.027741792237
141397114397.274465880127397.41666666670.5254975182896220.9703920025356
153684535454.427697070227088.41666666671.308840901753341.03922140035121
163533832386.303347392826751.04166666671.210655784957641.09114027683079
173502235908.218371215226576.58333333331.35112244944510.97531990136482
183477732526.568765464726436.20833333331.230379499031711.06918747719018
192688726876.180562489426058.54166666671.031377001302751.00040256603744
202397027622.958560561425755.3751.072512380835510.86775643338303
212278022178.937707340325430.8750.8721264096237491.02710058978437
221735119709.690338401924864.29166666670.7926906023558640.880328391877052
232138220971.687509883624288.16666666670.8634528821257391.01956506790038
242456122765.908719966223695.16666666670.9607828060560681.07884997265492
251740918067.468016026623146.750.7805617642229060.963555047367873
261151412062.467096389322954.3750.5254975182896220.954531101141531
273151429978.073759021522904.29166666671.308840901753341.05123498772219
282707127712.213581626622890.251.210655784957640.97686169747004
292946230934.286260657922895.251.35112244944510.952406005160353
302610528176.869641512822900.95833333331.230379499031710.926469133446238
312239723664.644476599522944.70833333331.031377001302750.946432980311493
322384324801.938182852923125.08333333331.072512380835510.961336159465316
332170520187.945791370123147.95833333330.8721264096237491.07514653666637
341808918310.426281368323099.08333333330.7926906023558640.987907093042743
352076420279.126344011923486.08333333330.8634528821257391.02390998743056
362531623081.645969606424023.79166666670.9607828060560681.09680219657367
371770418954.056086556424282.58333333330.7805617642229060.934048096046152
381554812777.034242613624314.16666666670.5254975182896221.21687080935768
392802931647.500329207924179.79166666671.308840901753340.885662365382192
402938329058.866366427824002.58333333331.210655784957641.01115437985381
413643832376.9472560529239631.35112244944511.12543037834390
423203429333.272573165323840.83333333331.230379499031711.09207044389944
432267924542.947941292223796.29166666671.031377001302750.92405362445657
442431925509.483538093323784.79166666671.072512380835510.953331727147062
451800420742.363817688023783.66666666670.8721264096237490.867982075632436
461753718784.455261577123697.08333333330.7926906023558640.933591086661494
472036620060.744719241023233.16666666670.8634528821257391.01521654779178
482278221805.846501014722695.91666666670.9607828060560681.04476567781672
491916917526.083385724322453.16666666670.7805617642229061.09374123003511
501380711852.749795131922555.29166666670.5254975182896221.16487736927263
512974329668.042070418722667.41666666671.308840901753341.00252655464770
522559127500.903703160422715.70833333331.210655784957640.930551238469268
532909630720.4711330332227371.35112244944510.947120891278049
542648227786.53174544522583.70833333331.230379499031710.953051652599326
552240523133.872087304122430.08333333331.031377001302750.968493294829615
562704423886.772305889122271.79166666671.072512380835511.13217473058645
571797019391.258316178822234.45833333330.8721264096237490.926706235716894
581873017827.446503107922489.79166666670.7926906023558641.05062718862933
591968419754.362854900022878.33333333330.8634528821257390.9964381106383
601978522225.028032773623132.20833333330.9607828060560680.890212600444173
611847918219.189708947423341.1250.7805617642229061.01426025499504
621069812287.117285458123381.8750.5254975182896220.870668013616272
633195630430.496430727623249.95833333331.308840901753341.05013074869630
642950628086.407107160623199.33333333331.210655784957641.05054376971120
653450631182.949088124623079.29166666671.35112244944511.10656628090192
662716528382.496815288523068.08333333331.230379499031710.957103956596493
672673623796.746680849723072.79166666671.031377001302751.12351492237868
682369124637.352220410522971.6251.072512380835510.961588720575804
691815719955.560441805822881.50.8721264096237490.90987171485107
701732818012.870046509022723.70833333330.7926906023558640.961978849303823
711820519375.846697698222439.95833333330.8634528821257390.939571843441698
722099521353.317799362322224.91666666670.9607828060560680.983219572586843
731738217252.236300109422102.33333333330.7805617642229061.00752155822777
74936711624.596289274522121.1250.5254975182896220.805791424227137
753112429190.15153616622302.29166666671.308840901753341.0662500316738
762655127183.05611561822453.16666666671.210655784957640.976748158377422
773065130538.463679739222602.29166666671.35112244944511.00368506816325
782585928116.991172559922852.29166666671.230379499031710.919693001334952
792510023836.325773274723111.16666666671.031377001302751.05301463987131
802577825046.336941635823352.95833333331.072512380835511.02921237784468
812041820505.290788672023511.83333333330.8721264096237490.995743011422194
821868818769.790485433523678.58333333330.7926906023558640.995642440148866
832042420550.682275440523800.58333333330.8634528821257390.99383561704947
842477623085.088774661424027.3750.9607828060560681.07324690157547
851981418976.041909582024310.750.7805617642229061.04415873944686
861273812814.278879222424385.04166666670.5254975182896220.994047352961388
873156631962.167496004424420.20833333331.308840901753340.987605111697948
883011129508.372770584324373.8751.210655784957641.02042224537764
893001932886.88338718124340.41666666671.35112244944510.912795525394818
903193429837.112978018724250.33333333331.230379499031711.07027781218398
912582624731.904802739223979.51.031377001302751.04423820995541
922683525473.822501430523751.54166666671.072512380835511.05343436378632
932020520447.330721032423445.3750.8721264096237490.988148540054515
941778918183.959101517422939.54166666670.7926906023558640.978279806981941
952052019510.257529682422595.6250.8634528821257391.05175444090276
962251821390.347970012422263.45833333330.9607828060560681.05271779737144
971557217018.653192165721803.08333333330.7805617642229060.914996023725799
981150911251.9528616174214120.5254975182896221.02284466896937
992544727738.428835971321193.1251.308840901753340.91739154191027
1002409025556.9436204557211101.210655784957640.942600975991449
1012778628448.896514903721055.751.35112244944510.976698691474504
1022619525880.058711695421034.20833333331.230379499031711.01216926483101
1032051621828.492595988621164.41666666671.031377001302750.939872504241096
10422759NANA1.07251238083551NA
10519028NANA0.872126409623749NA
10616971NANA0.792690602355864NA
10720036NANA0.863452882125739NA
10822485NANA0.960782806056068NA
10918730NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/1d4au1259837274.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/1d4au1259837274.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/2vk9u1259837274.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/2vk9u1259837274.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/3nn6y1259837274.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/3nn6y1259837274.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/4f9fz1259837274.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125983741356xv552pejzlhqu/4f9fz1259837274.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = 0.5 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 12 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
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()
bitmap(file='test3.png')
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()
bitmap(file='test4.png')
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()
load(file='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='mytable.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by