Home » date » 2010 » Jul » 29 »

Tijdreeks 1 - Stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 29 Jul 2010 11:30:26 +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/Jul/29/t1280403021lunfhvdb007w75v.htm/, Retrieved Thu, 29 Jul 2010 13:30:27 +0200
 
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/Jul/29/t1280403021lunfhvdb007w75v.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:
Habimana Christelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
900 899 898 896 916 915 900 890 891 891 892 894 896 889 878 883 901 897 881 866 867 866 862 871 865 856 847 859 870 872 856 839 829 825 822 827 822 812 810 816 820 823 810 793 777 772 765 765 753 742 736 740 742 742 728 707 699 696 689 692 673 653 642 648 654 653 630 609 598 601 592 591 568 538 523 530 529 534 513 491 480 478 462 461 437 411 400 405 395 407 385 366 349 343 332 327 306 276 269 268 260 274 247 226 212 199 188 179 155 124 117 116 105 112 86 64 53 42 32 24
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1900NANA-1.15354938271603NA
2899NANA-12.8942901234568NA
3898NANA-13.9683641975309NA
4896NANA-1.38040123456790NA
5916NANA7.75385802469136NA
6915NANA19.9853395061728NA
7900906.165895061728898.3333333333337.83256172839507-6.16589506172829
8890894.508487654321897.75-3.24151234567901-4.50848765432102
9891891.01774691358896.5-5.48225308641977-0.0177469135801402
10891893.425154320988895.125-1.69984567901233-2.42515432098753
11892892.179783950617893.958333333333-1.77854938271604-0.179783950617207
12894898.610339506173892.5833333333336.02700617283953-4.61033950617275
13896889.88811728395891.041666666667-1.153549382716036.11188271604942
14889876.355709876543889.25-12.894290123456812.6442901234568
15878873.28163580247887.25-13.96836419753094.71836419753083
16883883.827932098765885.208333333333-1.38040123456790-0.82793209876536
17901890.670524691358882.9166666666677.7538580246913610.3294753086421
18897900.693672839506880.70833333333319.9853395061728-3.69367283950612
19881886.290895061728878.4583333333337.83256172839507-5.29089506172841
20866872.550154320988875.791666666667-3.24151234567901-6.55015432098753
21867867.64274691358873.125-5.48225308641977-0.642746913580254
22866869.13348765432870.833333333333-1.69984567901233-3.13348765432079
23862866.76311728395868.541666666667-1.77854938271604-4.76311728395046
24871872.235339506173866.2083333333336.02700617283953-1.23533950617264
25865862.971450617284864.125-1.153549382716032.02854938271616
26856849.064043209877861.958333333333-12.89429012345686.93595679012344
27847845.281635802469859.25-13.96836419753091.71836419753083
28859854.577932098766855.958333333333-1.380401234567904.42206790123441
29870860.337191358025852.5833333333337.753858024691369.66280864197518
30872869.068672839506849.08333333333319.98533950617282.93132716049388
31856853.290895061728845.4583333333337.832561728395072.70910493827159
32839838.591820987654841.833333333333-3.241512345679010.408179012345613
33829832.976080246914838.458333333333-5.48225308641977-3.97608024691351
34825833.425154320988835.125-1.69984567901233-8.42515432098753
35822829.471450617284831.25-1.77854938271604-7.47145061728395
36827833.15200617284827.1256.02700617283953-6.15200617283949
37822822.01311728395823.166666666667-1.15354938271603-0.0131172839504643
38812806.439043209877819.333333333333-12.89429012345685.56095679012344
39810801.28163580247815.25-13.96836419753098.71836419753095
40816809.494598765432810.875-1.380401234567906.50540123456801
41820814.045524691358806.2916666666677.753858024691365.95447530864215
42823821.318672839506801.33333333333319.98533950617281.68132716049399
43810803.707561728395795.8757.832561728395076.29243827160508
44793786.841820987654790.083333333333-3.241512345679016.15817901234561
45777778.601080246914784.083333333333-5.48225308641977-1.60108024691363
46772776.133487654321777.833333333333-1.69984567901233-4.13348765432102
47765769.63811728395771.416666666667-1.77854938271604-4.63811728395058
48765770.818672839506764.7916666666676.02700617283953-5.81867283950612
49753756.846450617284758-1.15354938271603-3.84645061728395
50742738.105709876543751-12.89429012345683.89429012345681
51736730.198302469136744.166666666667-13.96836419753095.8016975308642
52740736.369598765432737.75-1.380401234567903.63040123456801
53742739.170524691358731.4166666666677.753858024691362.82947530864203
54742745.193672839506725.20833333333319.9853395061728-3.19367283950612
55728726.665895061728718.8333333333337.832561728395071.33410493827159
56707708.550154320988711.791666666667-3.24151234567901-1.55015432098764
57699698.684413580247704.166666666667-5.482253086419770.315586419753117
58696694.716820987654696.416666666667-1.699845679012331.28317901234561
59689687.138117283951688.916666666667-1.778549382716041.86188271604942
60692687.568672839506681.5416666666676.027006172839534.43132716049388
61673672.596450617284673.75-1.153549382716030.403549382716051
62653652.689043209877665.583333333333-12.89429012345680.310956790123441
63642643.323302469136657.291666666667-13.9683641975309-1.32330246913580
64648647.744598765432649.125-1.380401234567900.255401234568012
65654648.878858024691641.1257.753858024691365.12114197530866
66653652.860339506173632.87519.98533950617280.139660493827137
67630632.124228395062624.2916666666677.83256172839507-2.12422839506155
68609611.883487654321615.125-3.24151234567901-2.88348765432102
69598599.89274691358605.375-5.48225308641977-1.89274691358025
70601593.800154320988595.5-1.699845679012337.19984567901247
71592583.596450617284585.375-1.778549382716048.40354938271616
72591581.235339506173575.2083333333336.027006172839539.76466049382725
73568564.221450617284565.375-1.153549382716033.77854938271616
74538542.689043209876555.583333333333-12.8942901234568-4.68904320987644
75523531.781635802469545.75-13.9683641975309-8.78163580246905
76530534.327932098765535.708333333333-1.38040123456790-4.32793209876536
77529532.920524691358525.1666666666677.75385802469136-3.92052469135797
78534534.318672839506514.33333333333319.9853395061728-0.318672839506007
79513511.290895061728503.4583333333337.832561728395071.70910493827159
80491489.466820987654492.708333333333-3.241512345679011.53317901234573
81480476.809413580247482.291666666667-5.482253086419773.19058641975306
82478470.258487654321471.958333333333-1.699845679012337.74151234567904
83462459.388117283951461.166666666667-1.778549382716042.61188271604937
84461456.318672839506450.2916666666676.027006172839534.68132716049382
85437438.513117283951439.666666666667-1.15354938271603-1.51311728395058
86411416.230709876543429.125-12.8942901234568-5.23070987654313
87400404.489969135802418.458333333333-13.9683641975309-4.48996913580243
88405405.994598765432407.375-1.38040123456790-0.994598765432158
89395404.087191358025396.3333333333337.75385802469136-9.08719135802465
90407405.318672839506385.33333333333319.98533950617281.68132716049394
91385382.124228395062374.2916666666677.832561728395072.87577160493834
92366359.966820987654363.208333333333-3.241512345679016.03317901234573
93349346.64274691358352.125-5.482253086419772.35725308641969
94343339.258487654321340.958333333333-1.699845679012333.74151234567898
95332327.846450617284329.625-1.778549382716044.15354938271605
96327324.485339506173318.4583333333336.027006172839532.51466049382719
97306306.013117283951307.166666666667-1.15354938271603-0.0131172839506348
98276282.689043209877295.583333333333-12.8942901234568-6.6890432098765
99269270.073302469136284.041666666667-13.9683641975309-1.07330246913580
100268270.952932098765272.333333333333-1.38040123456790-2.95293209876542
101260268.087191358025260.3333333333337.75385802469136-8.08719135802468
102274268.152006172839248.16666666666719.98533950617285.84799382716054
103247243.540895061728235.7083333333337.832561728395073.45910493827162
104226219.841820987654223.083333333333-3.241512345679016.1581790123457
105212204.934413580247210.416666666667-5.482253086419777.06558641975312
106199196.050154320988197.75-1.699845679012332.94984567901236
107188183.179783950617184.958333333333-1.778549382716044.82021604938268
108179177.777006172840171.756.027006172839531.22299382716048
109155157.138117283951158.291666666667-1.15354938271603-2.13811728395063
110124131.939043209877144.833333333333-12.8942901234568-7.9390432098765
111117117.489969135802131.458333333333-13.9683641975309-0.489969135802482
112116116.911265432099118.291666666667-1.38040123456790-0.911265432098787
113105113.003858024691105.257.75385802469136-8.00385802469135
114112112.27700617283992.291666666666719.9853395061728-0.277006172839464
11586NANA7.83256172839507NA
11664NANA-3.24151234567901NA
11753NANA-5.48225308641977NA
11842NANA-1.69984567901233NA
11932NANA-1.77854938271604NA
12024NANA6.02700617283953NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/1acg41280403023.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/1acg41280403023.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/2acg41280403023.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/2acg41280403023.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/3llxp1280403023.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/3llxp1280403023.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/4llxp1280403023.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/29/t1280403021lunfhvdb007w75v/4llxp1280403023.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