Home » date » 2010 » Dec » 15 »

opdracht 9 deel 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 15 Dec 2010 20:07:32 +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/15/t12924435508yvpcth4o3wvgqk.htm/, Retrieved Wed, 15 Dec 2010 21:05: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/15/t12924435508yvpcth4o3wvgqk.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
110,04 111,73 110,99 115,83 125,33 123,03 123,46 130,34 131,21 132,97 133,91 133,14 135,31 133,09 135,39 131,85 130,25 127,65 118,3 119,73 122,51 123,28 133,52 153,2 163,63 168,45 166,26 162,31 161,56 156,59 157,97 158,68 163,55 162,89 164,95 159,82 159,05 166,76 164,55 163,22 160,68 155,24 157,6 156,56 154,82 151,11 149,65 148,99 148,53 146,7 145,11 142,7 143,59 140,96 140,77 139,81 140,58 139,59 138,05 136,06 135,98 134,75 132,22 135,37 138,84 138,83 136,55 135,63 139,14 136,09 135,97 134,51 134,54 134,08 132,86 134,48 129,08 133,13 134,78 134,13 132,43 127,84 128,12 128,94
 
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
1110.04NANA2.57600115740739NA
2111.73NANA3.60273726851851NA
3110.99NANA2.32794560185187NA
4115.83NANA1.27843171296296NA
5125.33NANA0.365931712962961NA
6123.03NANA-1.49802662037037NA
7123.46121.376556712963124.55125-3.174693287037042.08344328703706
8130.34124.010792824074126.494166666667-2.483373842592596.32920717592594
9131.21127.453709490741128.400833333333-0.9471238425925723.75629050925926
10132.97127.876487268518130.085-2.208512731481495.0935127314815
11133.91130.28009837963130.9575-0.6774016203703663.62990162037039
12133.14132.193084490741131.3550.8380844907407310.94691550925927
13135.31133.908501157407131.33252.576001157407391.40149884259259
14133.09134.278153935185130.6754166666673.60273726851851-1.18815393518517
15135.39132.198778935185129.8708333333332.327945601851873.19122106481481
16131.85130.383015046296129.1045833333331.278431712962961.46698495370373
17130.25129.050515046296128.6845833333330.3659317129629611.19948495370372
18127.65128.006140046296129.504166666667-1.49802662037037-0.356140046296275
19118.3128.345306712963131.52-3.17469328703704-10.045306712963
20119.73131.689959490741134.173333333333-2.48337384259259-11.9599594907407
21122.51135.985792824074136.932916666667-0.947123842592572-13.4757928240741
22123.28137.279820601852139.488333333333-2.20851273148149-13.9998206018519
23133.52141.384681712963142.062083333333-0.677401620370366-7.86468171296295
24153.2145.410584490741144.57250.8380844907407317.78941550925927
25163.63150.007251157407147.431252.5760011574073913.6227488425926
26168.45154.309820601852150.7070833333333.6027372685185114.1401793981481
27166.26156.367945601852154.042.327945601851879.89205439814813
28162.31158.67884837963157.4004166666671.278431712962963.63115162037036
29161.56160.72634837963160.3604166666670.3659317129629610.833651620370404
30156.59160.447806712963161.945833333333-1.49802662037037-3.85780671296294
31157.97158.856140046296162.030833333333-3.17469328703704-0.886140046296305
32158.68159.286209490741161.769583333333-2.48337384259259-0.606209490740724
33163.55160.680792824074161.627916666667-0.9471238425925722.86920717592594
34162.89159.386070601852161.594583333333-2.208512731481493.50392939814813
35164.95160.918431712963161.595833333333-0.6774016203703664.03156828703703
36159.82162.341001157407161.5029166666670.838084490740731-2.5210011574074
37159.05164.007251157407161.431252.57600115740739-4.9572511574074
38166.76164.930237268519161.32753.602737268518511.82976273148148
39164.55163.203362268519160.8754166666672.327945601851871.34663773148151
40163.22161.299265046296160.0208333333331.278431712962961.92073495370371
41160.68159.258431712963158.89250.3659317129629611.42156828703705
42155.24156.30572337963157.80375-1.49802662037037-1.06572337962965
43157.6153.73947337963156.914166666667-3.174693287037043.86052662037034
44156.56153.156626157407155.64-2.483373842592593.40337384259257
45154.82153.047042824074153.994166666667-0.9471238425925721.77295717592591
46151.11150.120653935185152.329166666667-2.208512731481490.989346064814782
47149.65150.084681712963150.762083333333-0.677401620370366-0.434681712962941
48148.99150.293084490741149.4550.838084490740731-1.30308449074073
49148.53150.734751157407148.158752.57600115740739-2.2047511574074
50146.7150.362320601852146.7595833333333.60273726851851-3.66232060185186
51145.11147.796278935185145.4683333333332.32794560185187-2.68627893518516
52142.7145.673431712963144.3951.27843171296296-2.97343171296296
53143.59143.79759837963143.4316666666670.365931712962961-0.207598379629644
54140.96140.911556712963142.409583333333-1.498026620370370.0484432870370597
55140.77138.17322337963141.347916666667-3.174693287037042.59677662037038
56139.81137.843709490741140.327083333333-2.483373842592591.96629050925924
57140.58138.344959490741139.292083333333-0.9471238425925722.23504050925925
58139.59136.241070601852138.449583333333-2.208512731481493.34892939814816
59138.05137.26884837963137.94625-0.6774016203703660.781151620370395
60136.06138.497667824074137.6595833333330.838084490740731-2.43766782407405
61135.98139.971001157407137.3952.57600115740739-3.99100115740742
62134.75140.647737268519137.0453.60273726851851-5.89773726851851
63132.22139.138778935185136.8108333333332.32794560185187-6.9187789351852
64135.37137.883431712963136.6051.27843171296296-2.51343171296298
65138.84136.738431712963136.37250.3659317129629612.10156828703703
66138.83134.72322337963136.22125-1.498026620370374.1067766203704
67136.55132.92197337963136.096666666667-3.174693287037043.62802662037041
68135.63133.525376157407136.00875-2.483373842592592.10462384259259
69139.14135.060376157407136.0075-0.9471238425925724.07962384259258
70136.09133.788570601852135.997083333333-2.208512731481492.30142939814817
71135.97134.875931712963135.553333333333-0.6774016203703661.09406828703706
72134.51135.747251157407134.9091666666670.838084490740731-1.2372511574074
73134.54137.173917824074134.5979166666672.57600115740739-2.63391782407408
74134.08138.064403935185134.4616666666673.60273726851851-3.98440393518518
75132.86136.447528935185134.1195833333332.32794560185187-3.58752893518516
76134.48134.774681712963133.496251.27843171296296-0.294681712962927
77129.08133.19134837963132.8254166666670.365931712962961-4.11134837962962
78133.13130.76822337963132.26625-1.498026620370372.36177662037036
79134.78NANA-3.17469328703704NA
80134.13NANA-2.48337384259259NA
81132.43NANA-0.947123842592572NA
82127.84NANA-2.20851273148149NA
83128.12NANA-0.677401620370366NA
84128.94NANA0.838084490740731NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/1c3zl1292443647.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/1c3zl1292443647.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/2c3zl1292443647.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/2c3zl1292443647.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/35ug61292443647.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/35ug61292443647.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/45ug61292443647.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t12924435508yvpcth4o3wvgqk/45ug61292443647.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