Home » date » 2010 » Dec » 13 »

Katrien Monnens

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 13 Dec 2010 18:34:44 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c.htm/, Retrieved Mon, 13 Dec 2010 19:34:51 +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/2010/Dec/13/t1292265290u9kkxn6tizgit6c.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
103,6 103,5 110,9 115,8 117,8 121,1 128,7 112,7 111,3 116,2 109,8 137,9 98,7 100,5 128,7 98,7 115 121 125,9 117,3 115 113,8 115,7 145,5 101,7 106,9 116,4 114,6 122,5 120,4 116,5 117 114,3 111,5 117,8 141,5 102,6 103,8 119,8 113,6 121,8 123,9 122,7 120 111,6 117,6 121,3 143,7 107,1 107,7 126,4 111,5 127,9 124,9 122 124,9 113,9 120,8 123,3 143,5 107,1 106,5 114,6 122,2 120,2 123,1 127,1 118,5 116,1 120,6 115,7 146,5 108 106,6 122,2 115,8 115,6 124,5 121,7 118,7 113,7 113,4 115,1 143,9 101 103,4 121,5 111,9 117,4 124,3 122 119,7 115 112,2 115,3 142,6 104,1 105,3 124,4 113,9 124,8 131,8 125,6 125 119,7 116,1 120 148,1 109,2 109,4 135,1 114,9 129 138,5 125,6 130,4 120,3 126,2 127,6 150,9 114,6 118,6 131,4 124,5 136,8 136,8 136,6 131 125,8 129,4 124,8 157,1 116,6 114,2 128,4 127,3 133,5 137,2 137,7 131,2 127,7 133,9 124,3 160,6
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1103.6NANA-14.4693497474747NA
2103.5NANA-13.4644255050505NA
3110.9NANA3.31246843434344NA
4115.8NANA-5.90760732323232NA
5117.8NANA2.66133207070707NA
6121.1NANA6.32951388888889NA
7128.7120.24466540404115.5708333333334.673832070707068.4553345959596
8112.7116.262089646465115.2416666666671.02042297979798-3.56208964646464
9111.3111.453756313131115.858333333333-4.40457702020203-0.153756313131296
10116.2113.291256313131115.8875-2.596243686868692.9087436868687
11109.8113.140877525253115.058333333333-1.91745580808081-3.34087752525252
12137.9139.699589646465114.937524.7620896464646-1.79958964646464
1398.7100.347316919192114.816666666667-14.4693497474747-1.64731691919192
14100.5101.427241161616114.891666666667-13.4644255050505-0.92724116161618
15128.7118.549968434343115.23753.3124684343434410.1500315656565
1698.7109.384059343434115.291666666667-5.90760732323232-10.6840593434343
17115118.098832070707115.43752.66133207070707-3.09883207070706
18121122.3295138888891166.32951388888889-1.32951388888885
19125.9121.115498737374116.4416666666674.673832070707064.78450126262631
20117.3117.853756313131116.8333333333331.02042297979798-0.553756313131288
21115112.182922979798116.5875-4.404577020202032.81707702020203
22113.8114.141256313131116.7375-2.59624368686869-0.341256313131311
23115.7115.795044191919117.7125-1.91745580808081-0.0950441919192002
24145.5142.76208964646511824.76208964646462.73791035353534
25101.7103.113983585859117.583333333333-14.4693497474747-1.41398358585857
26106.9103.714741161616117.179166666667-13.46442550505053.18525883838385
27116.4120.449968434343117.13753.31246843434344-4.04996843434343
28114.6111.104892676768117.0125-5.907607323232323.49510732323235
29122.5119.665498737374117.0041666666672.661332070707072.83450126262629
30120.4123.254513888889116.9256.32951388888889-2.85451388888886
31116.5121.46966540404116.7958333333334.67383207070706-4.96966540404038
32117117.724589646465116.7041666666671.02042297979798-0.724589646464622
33114.3112.312089646465116.716666666667-4.404577020202031.98791035353538
34111.5114.220422979798116.816666666667-2.59624368686869-2.72042297979796
35117.8114.828377525253116.745833333333-1.917455808080812.97162247474746
36141.5141.624589646465116.862524.7620896464646-0.124589646464628
37102.6102.797316919192117.266666666667-14.4693497474747-0.197316919191934
38103.8104.18557449495117.65-13.4644255050505-0.385574494949509
39119.8120.974968434343117.66253.31246843434344-1.17496843434344
40113.6111.896559343434117.804166666667-5.907607323232321.70344065656566
41121.8120.865498737374118.2041666666672.661332070707070.93450126262627
42123.9124.771180555556118.4416666666676.32951388888889-0.871180555555512
43122.7123.39466540404118.7208333333334.67383207070706-0.694665404040393
44120120.091256313131119.0708333333331.02042297979798-0.0912563131312965
45111.6115.103756313131119.508333333333-4.40457702020203-3.50375631313129
46117.6117.099589646465119.695833333333-2.596243686868690.500410353535372
47121.3117.945044191919119.8625-1.917455808080813.3549558080808
48143.7144.920422979798120.15833333333324.7620896464646-1.22042297979797
49107.1105.701483585859120.170833333333-14.46934974747471.39851641414141
50107.7106.881407828283120.345833333333-13.46442550505050.818592171717185
51126.4123.958301767677120.6458333333333.312468434343442.44169823232325
52111.5114.967392676768120.875-5.90760732323232-3.46739267676766
53127.9123.752998737374121.0916666666672.661332070707074.14700126262629
54124.9127.496180555556121.1666666666676.32951388888889-2.59618055555553
55122125.83216540404121.1583333333334.67383207070706-3.8321654040404
56124.9122.128756313131121.1083333333331.020422979797982.7712436868687
57113.9116.162089646465120.566666666667-4.40457702020203-2.26208964646464
58120.8117.924589646465120.520833333333-2.596243686868692.87541035353537
59123.3118.728377525253120.645833333333-1.917455808080814.57162247474746
60143.5145.012089646465120.2524.7620896464646-1.51208964646464
61107.1105.918150252525120.3875-14.46934974747471.18184974747476
62106.5106.868907828283120.333333333333-13.4644255050505-0.368907828282829
63114.6123.470801767677120.1583333333333.31246843434344-8.87080176767678
64122.2114.334059343434120.241666666667-5.907607323232327.86594065656567
65120.2122.577998737374119.9166666666672.66133207070707-2.37799873737373
66123.1126.054513888889119.7256.32951388888889-2.95451388888888
67127.1124.561332070707119.88754.673832070707062.53866792929294
68118.5120.949589646465119.9291666666671.02042297979798-2.44958964646462
69116.1115.845422979798120.25-4.404577020202030.254577020202007
70120.6117.703756313131120.3-2.596243686868692.89624368686869
71115.7117.924210858586119.841666666667-1.91745580808081-2.22421085858583
72146.5144.470422979798119.70833333333324.76208964646462.02957702020203
73108105.072316919192119.541666666667-14.46934974747472.92768308080808
74106.6105.860574494949119.325-13.46442550505050.739425505050505
75122.2122.545801767677119.2333333333333.31246843434344-0.345801767676775
76115.8112.925726010101118.833333333333-5.907607323232322.87427398989898
77115.6121.16966540404118.5083333333332.66133207070707-5.5696654040404
78124.5124.704513888889118.3756.32951388888889-0.204513888888869
79121.7122.648832070707117.9754.67383207070706-0.948832070707056
80118.7118.570422979798117.551.020422979797980.129577020202021
81113.7112.982922979798117.3875-4.404577020202030.717077020202012
82113.4114.599589646465117.195833333333-2.59624368686869-1.19958964646464
83115.1115.190877525253117.108333333333-1.91745580808081-0.0908775252525231
84143.9141.937089646465117.17524.76208964646461.96291035353538
85101102.709816919192117.179166666667-14.4693497474747-1.70981691919191
86103.4103.768907828283117.233333333333-13.4644255050505-0.368907828282815
87121.5120.64163510101117.3291666666673.312468434343440.858364898989905
88111.9111.425726010101117.333333333333-5.907607323232320.474273989899018
89117.4119.952998737374117.2916666666672.66133207070707-2.55299873737374
90124.3123.575347222222117.2458333333336.329513888888890.724652777777763
91122121.99466540404117.3208333333334.673832070707060.00533459595959584
92119.7118.549589646465117.5291666666671.020422979797981.15041035353536
93115113.324589646465117.729166666667-4.404577020202031.67541035353536
94112.2115.337089646465117.933333333333-2.59624368686869-3.13708964646463
95115.3116.407544191919118.325-1.91745580808081-1.10754419191919
96142.6143.707922979798118.94583333333324.7620896464646-1.10792297979796
97104.1104.938983585859119.408333333333-14.4693497474747-0.838983585858585
98105.3106.314741161616119.779166666667-13.4644255050505-1.01474116161616
99124.4123.508301767677120.1958333333333.312468434343440.891698232323236
100113.9114.646559343434120.554166666667-5.90760732323232-0.746559343434342
101124.8123.573832070707120.91252.661332070707071.22616792929291
102131.8127.667013888889121.33756.329513888888894.13298611111111
103125.6126.452998737374121.7791666666674.67383207070706-0.852998737373767
104125123.182922979798122.16251.020422979797981.81707702020202
105119.7118.374589646465122.779166666667-4.404577020202031.32541035353536
106116.1120.670422979798123.266666666667-2.59624368686869-4.570422979798
107120121.565877525253123.483333333333-1.91745580808081-1.56587752525253
108148.1148.699589646465123.937524.7620896464646-0.599589646464651
109109.2109.747316919192124.216666666667-14.4693497474747-0.547316919191914
110109.4110.977241161616124.441666666667-13.4644255050505-1.57724116161614
111135.1128.00413510101124.6916666666673.312468434343447.0958648989899
112114.9119.229892676768125.1375-5.90760732323232-4.32989267676766
113129128.536332070707125.8752.661332070707070.463667929292924
114138.5132.637847222222126.3083333333336.329513888888895.86215277777775
115125.6131.323832070707126.654.67383207070706-5.72383207070709
116130.4128.278756313131127.2583333333331.020422979797982.1212436868687
117120.3123.082922979798127.4875-4.40457702020203-2.78292297979799
118126.2125.137089646465127.733333333333-2.596243686868691.06291035353534
119127.6126.540877525253128.458333333333-1.917455808080811.05912247474748
120150.9153.474589646465128.712524.7620896464646-2.57458964646464
121114.6114.630650252525129.1-14.4693497474747-0.0306502525252483
122118.6116.118907828283129.583333333333-13.46442550505052.48109217171719
123131.4133.149968434343129.83753.31246843434344-1.7499684343434
124124.5124.292392676768130.2-5.907607323232320.207607323232338
125136.8132.877998737374130.2166666666672.661332070707073.92200126262628
126136.8136.687847222222130.3583333333336.329513888888890.112152777777766
127136.6135.373832070707130.74.673832070707061.22616792929293
128131131.620422979798130.61.02042297979798-0.620422979798008
129125.8125.887089646465130.291666666667-4.40457702020203-0.0870896464646478
130129.4127.687089646465130.283333333333-2.596243686868691.71291035353534
131124.8128.345044191919130.2625-1.91745580808081-3.54504419191919
132157.1154.903756313131130.14166666666724.76208964646462.19624368686868
133116.6115.734816919192130.204166666667-14.46934974747470.865183080808094
134114.2116.793907828283130.258333333333-13.4644255050505-2.59390782828282
135128.4133.658301767677130.3458333333333.31246843434344-5.25830176767677
136127.3124.704892676768130.6125-5.907607323232322.5951073232323
137133.5133.440498737374130.7791666666672.661332070707070.0595012626262701
138137.2137.233680555556130.9041666666676.32951388888889-0.033680555555577
139137.7NANA4.67383207070706NA
140131.2NANA1.02042297979798NA
141127.7NANA-4.40457702020203NA
142133.9NANA-2.59624368686869NA
143124.3NANA-1.91745580808081NA
144160.6NANA24.7620896464646NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/1u4ob1292265280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/1u4ob1292265280.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/2u4ob1292265280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/2u4ob1292265280.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/34vne1292265280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/34vne1292265280.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/44vne1292265280.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292265290u9kkxn6tizgit6c/44vne1292265280.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ;
 
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