Home » date » 2010 » Aug » 17 »

TIJDREEKS A - 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: Tue, 17 Aug 2010 14:31:20 +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/Aug/17/t1282055448oqhsto063wbk3ms.htm/, Retrieved Tue, 17 Aug 2010 16:30:55 +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/Aug/17/t1282055448oqhsto063wbk3ms.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:
Schrauwen Nathalie
 
Dataseries X:
» Textbox « » Textfile « » CSV «
125 124 123 121 141 140 125 115 116 116 117 119 114 110 108 111 124 125 118 108 107 103 113 116 113 105 102 107 119 116 113 102 96 95 101 110 103 88 79 96 118 116 114 102 98 98 101 117 109 98 93 98 114 115 112 112 103 107 104 117 123 113 97 90 109 104 92 102 90 97 99 108 106 86 72 71 96 88 83 90 85 100 108 118 124 99 92 86 112 104 93 104 96 109 113 123 127 96 100 95 133 130 117 129 122 134 141 152 161 122 126 119 160 162 145 161 151 166 169 185
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1125NANA11.3314043209877NA
2124NANA-7.08526234567902NA
3123NANA-12.7935956790123NA
4121NANA-12.7426697530864NA
5141NANA10.3406635802469NA
6140NANA7.01658950617284NA
7125122.447145061728123.041666666667-0.5945216049382722.55285493827162
8115120.914737654321122-1.08526234567901-5.91473765432099
9116114.035108024691120.791666666667-6.756558641975311.96489197530866
10116118.099922839506119.75-1.65007716049382-2.09992283950618
11117121.118441358025118.6252.49344135802469-4.11844135802468
12119128.817515432099117.29166666666711.5258487654321-9.81751543209877
13114127.706404320988116.37511.3314043209877-13.7064043209877
14110108.706404320988115.791666666667-7.085262345679021.29359567901233
15108102.331404320988115.125-12.79359567901235.66859567901236
16111101.465663580247114.208333333333-12.74266975308649.5343364197531
17124123.840663580247113.510.34066358024690.159336419753075
18125120.224922839506113.2083333333337.016589506172844.77507716049384
19118112.447145061728113.041666666667-0.5945216049382725.55285493827159
20108111.706404320988112.791666666667-1.08526234567901-3.70640432098764
21107105.576774691358112.333333333333-6.756558641975311.42322530864199
22103110.266589506173111.916666666667-1.65007716049382-7.26658950617283
23113114.035108024691111.5416666666672.49344135802469-1.03510802469135
24116122.484182098765110.95833333333311.5258487654321-6.48418209876542
25113121.706404320988110.37511.3314043209877-8.70640432098766
26105102.831404320988109.916666666667-7.085262345679022.16859567901234
2710296.414737654321109.208333333333-12.79359567901235.58526234567903
2810795.6739969135803108.416666666667-12.742669753086411.3260030864197
29119117.923996913580107.58333333333310.34066358024691.07600308641975
30116113.849922839506106.8333333333337.016589506172842.15007716049384
31113105.572145061728106.166666666667-0.5945216049382727.4278549382716
32102103.956404320988105.041666666667-1.08526234567901-1.95640432098766
339696.6184413580247103.375-6.75655864197531-0.618441358024697
3495100.308256172840101.958333333333-1.65007716049382-5.30825617283952
35101103.951774691358101.4583333333332.49344135802469-2.95177469135801
36110112.942515432099101.41666666666711.5258487654321-2.94251543209876
37103112.789737654321101.45833333333311.3314043209877-9.78973765432099
388894.414737654321101.5-7.08526234567902-6.414737654321
397988.789737654321101.583333333333-12.7935956790123-9.78973765432099
409689.0489969135802101.791666666667-12.74266975308646.95100308641976
41118112.257330246914101.91666666666710.34066358024695.74266975308643
42116109.224922839506102.2083333333337.016589506172846.77507716049385
43114102.155478395062102.75-0.59452160493827211.8445216049383
44102102.331404320988103.416666666667-1.08526234567901-0.331404320987644
459897.6601080246914104.416666666667-6.756558641975310.339891975308646
4698103.433256172839105.083333333333-1.65007716049382-5.43325617283949
47101107.4934413580251052.49344135802469-6.49344135802468
48117116.317515432099104.79166666666711.52584876543210.682484567901227
49109115.998070987654104.66666666666711.3314043209877-6.99807098765433
509897.914737654321105-7.085262345679020.0852623456790127
519392.8314043209876105.625-12.79359567901230.168595679012370
529893.4656635802469106.208333333333-12.74266975308644.5343364197531
53114117.048996913580106.70833333333310.3406635802469-3.04899691358025
54115113.849922839506106.8333333333337.016589506172841.15007716049384
55112106.822145061728107.416666666667-0.5945216049382725.17785493827161
56112107.539737654321108.625-1.085262345679014.46026234567903
57103102.660108024691109.416666666667-6.756558641975310.339891975308674
58107107.599922839506109.25-1.65007716049382-0.599922839506149
59104111.201774691358108.7083333333332.49344135802469-7.201774691358
60117119.567515432099108.04166666666711.5258487654321-2.56751543209876
61123118.081404320988106.7511.33140432098774.91859567901234
6211398.414737654321105.5-7.0852623456790214.585262345679
639791.7480709876543104.541666666667-12.79359567901235.25192901234568
649090.8406635802469103.583333333333-12.7426697530864-0.840663580246911
65109113.298996913580102.95833333333310.3406635802469-4.29899691358025
66104109.391589506173102.3757.01658950617284-5.39158950617282
6792100.697145061728101.291666666667-0.594521604938272-8.6971450617284
6810298.373070987654399.4583333333333-1.085262345679013.6269290123457
699090.535108024691497.2916666666667-6.75655864197531-0.535108024691354
709793.808256172839595.4583333333333-1.650077160493823.19174382716049
719996.618441358024794.1252.493441358024692.38155864197530
72108104.44251543209992.916666666666711.52584876543213.55748456790124
73106103.20640432098891.87511.33140432098772.79359567901236
748683.91473765432191-7.085262345679022.08526234567903
757277.498070987654390.2916666666667-12.7935956790123-5.4980709876543
767177.465663580246990.2083333333333-12.7426697530864-6.46566358024691
7796101.04899691358090.708333333333310.3406635802469-5.04899691358025
788898.516589506172891.57.01658950617284-10.5165895061728
798392.072145061728492.6666666666667-0.594521604938272-9.0721450617284
809092.873070987654393.9583333333333-1.08526234567901-2.87307098765432
818588.57677469135895.3333333333333-6.75655864197531-3.57677469135801
8210095.141589506172896.7916666666667-1.650077160493824.85841049382717
83108100.57677469135898.08333333333332.493441358024697.423225308642
84118110.94251543209999.416666666666711.52584876543217.05748456790124
85124111.831404320988100.511.331404320987712.1685956790124
869994.414737654321101.5-7.085262345679024.58526234567903
879289.7480709876543102.541666666667-12.79359567901232.25192901234571
888690.6323302469136103.375-12.7426697530864-4.63233024691357
89112114.298996913580103.95833333333310.3406635802469-2.29899691358024
90104111.391589506173104.3757.01658950617284-7.39158950617283
9193104.113811728395104.708333333333-0.594521604938272-11.1138117283951
92104103.623070987654104.708333333333-1.085262345679010.37692901234567
939698.1601080246914104.916666666667-6.75655864197531-2.16010802469135
94109103.974922839506105.625-1.650077160493825.02507716049382
95113109.368441358025106.8752.493441358024693.6315586419753
96123120.359182098765108.83333333333311.52584876543212.64081790123457
97127122.248070987654110.91666666666711.33140432098774.75192901234568
9896105.873070987654112.958333333333-7.08526234567902-9.8730709876543
99100102.289737654321115.083333333333-12.7935956790123-2.28973765432097
10095104.465663580247117.208333333333-12.7426697530864-9.4656635802469
101133129.757330246914119.41666666666710.34066358024693.24266975308643
102130128.808256172839121.7916666666677.016589506172841.19174382716051
103117123.822145061728124.416666666667-0.594521604938272-6.8221450617284
104129125.831404320988126.916666666667-1.085262345679013.16859567901236
105122122.326774691358129.083333333333-6.75655864197531-0.326774691358025
106134129.516589506173131.166666666667-1.650077160493824.48341049382717
107141135.785108024691133.2916666666672.493441358024695.21489197530866
108152147.275848765432135.7511.52584876543214.7241512345679
109161149.581404320988138.2511.331404320987711.4185956790124
110122133.664737654321140.75-7.08526234567902-11.6647376543210
111126130.498070987654143.291666666667-12.7935956790123-4.49807098765433
112119133.090663580247145.833333333333-12.7426697530864-14.0906635802469
113160158.673996913580148.33333333333310.34066358024691.32600308641977
114162157.891589506173150.8757.016589506172844.10841049382717
115145NANA-0.594521604938272NA
116161NANA-1.08526234567901NA
117151NANA-6.75655864197531NA
118166NANA-1.65007716049382NA
119169NANA2.49344135802469NA
120185NANA11.5258487654321NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/1xxrn1282055478.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/1xxrn1282055478.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/287qq1282055478.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/287qq1282055478.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/387qq1282055478.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/387qq1282055478.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/40gps1282055478.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/17/t1282055448oqhsto063wbk3ms/40gps1282055478.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