Home » date » 2010 » Aug » 20 »

Tijdreeks A Stap 28

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 20 Aug 2010 06:00:11 +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/20/t1282283991lewooq75fumgll3.htm/, Retrieved Fri, 20 Aug 2010 07:59:57 +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/20/t1282283991lewooq75fumgll3.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:
Willem Van Tendeloo MAR 201 A
 
Dataseries X:
» Textbox « » Textfile « » CSV «
252 251 250 248 268 267 252 242 243 243 244 246 236 241 240 239 253 249 232 229 221 222 224 224 215 225 225 221 238 234 228 227 216 219 225 227 205 215 214 209 222 216 206 199 189 198 203 211 199 211 210 203 214 202 193 193 176 192 200 195 180 197 194 194 212 202 195 198 170 187 190 189 176 188 195 194 211 203 194 194 163 183 181 184 171 178 179 186 205 204 195 186 156 167 164 165 153 160 154 169 186 188 187 169 131 146 145 137 119 118 113 123 142 141 138 124 83 100 96 98
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time13 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1252NANA-12.6523919753086NA
2251NANA-2.80054012345679NA
3250NANA-2.51350308641975NA
4248NANA0.444830246913585NA
5268NANA17.9031635802469NA
6267NANA14.3846450617284NA
7252255.380015432099249.8333333333335.54668209876544-3.38001543209876
8242250.528163580247248.751.77816358024692-8.52816358024691
9243231.833719135802247.916666666667-16.082947530864211.1662808641976
10243242.477237654321247.125-4.647762345679030.522762345679041
11244244.750385802469246.125-1.37461419753085-0.750385802469111
12246244.764274691358244.750.01427469135801981.23572530864197
13236230.514274691358243.166666666667-12.65239197530865.485725308642
14241238.99112654321241.791666666667-2.800540123456792.0088734567901
15240237.819830246914240.333333333333-2.513503086419752.18016975308640
16239238.986496913580238.5416666666670.4448302469135850.0135030864197461
17253254.736496913580236.83333333333317.9031635802469-1.73649691358023
18249249.467978395062235.08333333333314.3846450617284-0.467978395061721
19232238.838348765432233.2916666666675.54668209876544-6.8383487654321
20229233.528163580247231.751.77816358024692-4.52816358024688
21221214.375385802469230.458333333333-16.08294753086426.62461419753086
22222224.435570987654229.083333333333-4.64776234567903-2.4355709876543
23224226.333719135802227.708333333333-1.37461419753085-2.33371913580245
24224226.472608024691226.4583333333330.0142746913580198-2.47260802469134
25215213.014274691358225.666666666667-12.65239197530861.98572530864203
26225222.61612654321225.416666666667-2.800540123456792.38387345679018
27225222.61149691358225.125-2.513503086419752.38850308641977
28221225.236496913580224.7916666666670.444830246913585-4.23649691358023
29238242.611496913580224.70833333333317.9031635802469-4.61149691358023
30234239.259645061728224.87514.3846450617284-5.25964506172841
31228230.130015432099224.5833333333335.54668209876544-2.13001543209879
32227225.528163580247223.751.778163580246921.47183641975309
33216206.792052469136222.875-16.08294753086429.20794753086423
34219217.268904320988221.916666666667-4.647762345679031.73109567901238
35225219.375385802469220.75-1.374614197530855.62461419753089
36227219.347608024691219.3333333333330.01427469135801987.65239197530866
37205205.014274691358217.666666666667-12.6523919753086-0.0142746913579970
38215212.782793209877215.583333333333-2.800540123456792.21720679012344
39214210.778163580247213.291666666667-2.513503086419753.22183641975309
40209211.736496913580211.2916666666670.444830246913585-2.73649691358025
41222227.403163580247209.517.9031635802469-5.40316358024688
42216222.301311728395207.91666666666714.3846450617284-6.30131172839506
43206212.5466820987652075.54668209876544-6.54668209876542
44199208.361496913580206.5833333333331.77816358024692-9.36149691358025
45189190.167052469136206.25-16.0829475308642-1.16705246913577
46198201.185570987654205.833333333333-4.64776234567903-3.1855709876543
47203203.875385802469205.25-1.37461419753085-0.875385802469111
48211204.347608024691204.3333333333330.01427469135801986.65239197530866
49199190.555941358025203.208333333333-12.65239197530868.44405864197532
50211199.61612654321202.416666666667-2.8005401234567911.3838734567902
51210199.111496913580201.625-2.5135030864197510.8885030864198
52203201.278163580247200.8333333333330.4448302469135851.72183641975306
53214218.361496913580200.45833333333317.9031635802469-4.36149691358025
54202214.051311728395199.66666666666714.3846450617284-12.0513117283951
55193203.755015432099198.2083333333335.54668209876544-10.7550154320988
56193198.611496913580196.8333333333331.77816358024692-5.61149691358023
57176179.500385802469195.583333333333-16.0829475308642-3.50038580246914
58192189.893904320988194.541666666667-4.647762345679032.10609567901236
59200192.708719135802194.083333333333-1.374614197530857.29128086419755
60195194.0142746913581940.01427469135801980.985725308642003
61180181.430941358025194.083333333333-12.6523919753086-1.43094135802465
62197191.574459876543194.375-2.800540123456795.42554012345684
63194191.819830246914194.333333333333-2.513503086419752.18016975308646
64194194.319830246914193.8750.444830246913585-0.31983024691354
65212211.153163580247193.2517.90316358024690.846836419753117
66202206.967978395062192.58333333333314.3846450617284-4.96797839506169
67195197.713348765432192.1666666666675.54668209876544-2.71334876543207
68198193.403163580247191.6251.778163580246924.59683641975312
69170175.208719135802191.291666666667-16.0829475308642-5.20871913580245
70187186.685570987654191.333333333333-4.647762345679030.314429012345698
71190189.917052469136191.291666666667-1.374614197530850.0829475308642031
72189191.305941358025191.2916666666670.0142746913580198-2.30594135802468
73176178.639274691358191.291666666667-12.6523919753086-2.63927469135803
74188188.282793209877191.083333333333-2.80054012345679-0.282793209876559
75195188.111496913580190.625-2.513503086419756.88850308641972
76194190.611496913580190.1666666666670.4448302469135853.38850308641977
77211207.528163580247189.62517.90316358024693.47183641975312
78203203.426311728395189.04166666666714.3846450617284-0.426311728395035
79194194.171682098765188.6255.54668209876544-0.171682098765416
80194189.7781635802471881.778163580246924.22183641975312
81163170.833719135802186.916666666667-16.0829475308642-7.83371913580243
82183181.268904320988185.916666666667-4.647762345679031.73109567901238
83181183.958719135802185.333333333333-1.37461419753085-2.95871913580243
84184185.139274691358185.1250.0142746913580198-1.13927469135803
85171172.555941358025185.208333333333-12.6523919753086-1.55594135802468
86178182.11612654321184.916666666667-2.80054012345679-4.1161265432099
87179181.778163580247184.291666666667-2.51350308641975-2.77816358024691
88186183.778163580247183.3333333333330.4448302469135852.22183641975306
89205199.861496913580181.95833333333317.90316358024695.13850308641975
90204194.842978395062180.45833333333314.38464506172849.15702160493828
91195184.463348765432178.9166666666675.5466820987654410.5366512345679
92186179.194830246914177.4166666666671.778163580246926.80516975308643
93156159.542052469136175.625-16.0829475308642-3.5420524691358
94167169.227237654321173.875-4.64776234567903-2.22723765432099
95164171.000385802469172.375-1.37461419753085-7.00038580246914
96165170.930941358025170.9166666666670.0142746913580198-5.93094135802471
97153157.264274691358169.916666666667-12.6523919753086-4.264274691358
98160166.074459876543168.875-2.80054012345679-6.07445987654319
99154164.611496913580167.125-2.51350308641975-10.6114969135802
100169165.653163580247165.2083333333330.4448302469135853.34683641975309
101186181.444830246914163.54166666666717.90316358024694.55516975308643
102188175.967978395062161.58333333333314.384645061728412.0320216049383
103187164.5466820987651595.5466820987654422.4533179012346
104169157.611496913580155.8333333333331.7781635802469211.3885030864198
105131136.292052469136152.375-16.0829475308642-5.2920524691358
106146144.102237654321148.75-4.647762345679031.89776234567907
107145143.625385802469145-1.374614197530851.37461419753089
108137141.222608024691141.2083333333330.0142746913580198-4.22260802469137
109119124.555941358025137.208333333333-12.6523919753086-5.55594135802468
110118130.49112654321133.291666666667-2.80054012345679-12.4911265432099
111113126.903163580247129.416666666667-2.51350308641975-13.9031635802469
112123125.944830246914125.50.444830246913585-2.94483024691358
113142139.444830246914121.54166666666717.90316358024692.55516975308642
114141132.259645061728117.87514.38464506172848.7403549382716
115138NANA5.54668209876544NA
116124NANA1.77816358024692NA
11783NANA-16.0829475308642NA
118100NANA-4.64776234567903NA
11996NANA-1.37461419753085NA
12098NANA0.0142746913580198NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/1dqw41282283998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/1dqw41282283998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/26zeo1282283998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/26zeo1282283998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/36zeo1282283998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/36zeo1282283998.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/4h8v91282283998.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/20/t1282283991lewooq75fumgll3/4h8v91282283998.ps (open in new window)


 
Parameters (Session):
par1 = 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