Home » date » 2010 » Dec » 14 »

Opgave 9 oef 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 10:56:31 +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/14/t1292324103e3qmjin7dlv2cpr.htm/, Retrieved Tue, 14 Dec 2010 11:55:08 +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/14/t1292324103e3qmjin7dlv2cpr.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 «
771,28 766,78 757,59 747,73 746,59 744,5 744,29 743,79 738,89 736,74 732,77 731,58 731,48 730,08 724,19 716,81 714,84 713,18 713,16 713,15 713,6 707,08 704,11 704,36 704,36 701,93 696,44 686,58 684,48 683,74 683,7 683,52 678,77 674,71 670,28 668,85 668,85 669,35 672,28 671,6 671,96 671,18 671,18 681,14 682,23 679,98 679,69 679,69 679,7 681,21 672,32 669,98 667,91 666,04 666,04 666,27 664,45 660,76 660,4 660,69 660,69 662,23 661,41 659,02 655,43 652,59 652,59 648,2 645,84 644,67 642,71 640,14 640,14 639,64 630,28 614,57 614,7 615,08 615,08 614,43 604,55 598,98 594,05 593,05 593,05 593,34 584,72 580,7 577,08 569,92 569,92 568,86 559,38 548,22 545,61 545,33
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1771.28NANA2.02737103174604NA
2766.78NANA4.03653769841269NA
3757.59NANA0.983442460317468NA
4747.73NANA-2.88018849206356NA
5746.59NANA-2.48114087301588NA
6744.5NANA-2.35417658730161NA
7744.29744.621656746032745.219166666667-0.597509920634904-0.33165674603174
8743.79744.164573412698742.0316666666672.13290674603177-0.374573412698396
9738.89740.137966269841739.1108333333331.02713293650794-1.24796626984119
10736.74735.851180555556736.430833333333-0.5796527777777610.88881944444438
11732.77732.541716269841733.819583333333-1.277867063492050.228283730158751
12731.58731.154811507936731.191666666667-0.03685515873014480.425188492063626
13731.48730.61695436508728.5895833333332.027371031746040.863045634920809
14730.08730.052371031746726.0158333333334.036537698412690.0276289682541346
15724.19724.668859126984723.6854166666670.983442460317468-0.478859126984162
16716.81718.51564484127721.395833333333-2.88018849206356-1.70564484126999
17714.84716.484692460318718.965833333333-2.48114087301588-1.64469246031751
18713.18714.283323412698716.6375-2.35417658730161-1.1033234126985
19713.16713.775823412698714.373333333333-0.597509920634904-0.615823412698433
20713.15714.203323412698712.0704166666672.13290674603177-1.05332341269832
21713.6710.768382936508709.741251.027132936507942.83161706349199
22707.08706.745763888889707.325416666667-0.5796527777777610.334236111111181
23704.11703.522966269841704.800833333333-1.277867063492050.587033730158851
24704.36702.272311507936702.309166666667-0.03685515873014482.08768849206365
25704.36701.882371031746699.8552.027371031746042.47762896825395
26701.93701.429454365079697.3929166666674.036537698412690.500545634920741
27696.44695.690525793651694.7070833333330.9834424603174680.749474206349191
28686.58689.02689484127691.907083333334-2.88018849206356-2.44689484126991
29684.48686.667609126984689.14875-2.48114087301588-2.18760912698417
30683.74683.905406746032686.259583333333-2.35417658730161-0.165406746031749
31683.7682.702906746032683.300416666667-0.5975099206349040.997093253968387
32683.52682.596240079365680.4633333333332.132906746031770.923759920635007
33678.77679.126299603175678.0991666666671.02713293650794-0.356299603174648
34674.71675.888680555556676.468333333333-0.579652777777761-1.17868055555550
35670.28674.044632936508675.3225-1.27786706349205-3.76463293650806
36668.85674.24064484127674.2775-0.0368551587301448-5.39064484126982
37668.85675.259871031746673.23252.02737103174604-6.40987103174598
38669.35676.64820436508672.6116666666674.03653769841269-7.2982043650793
39672.28673.640109126984672.6566666666670.983442460317468-1.36010912698430
40671.6670.140228174603673.020416666667-2.880188492063561.45977182539696
41671.96671.150942460317673.632083333333-2.481140873015880.809057539682726
42671.18672.121656746032674.475833333333-2.35417658730161-0.941656746031754
43671.18674.782073412698675.379583333333-0.597509920634904-3.60207341269847
44681.14678.458740079365676.3258333333332.132906746031772.68125992063494
45682.23677.848799603175676.8216666666671.027132936507944.38120039682531
46679.98676.176180555556676.755833333333-0.5796527777777613.80381944444446
47679.69675.241716269841676.519583333333-1.277867063492054.44828373015889
48679.69676.099811507936676.136666666667-0.03685515873014483.5901884920637
49679.7677.735704365079675.7083333333332.027371031746041.96429563492075
50681.21678.911121031746674.8745833333334.036537698412692.29887896825414
51672.32674.497609126984673.5141666666670.983442460317468-2.17760912698407
52669.98669.092311507937671.9725-2.880188492063560.88768849206349
53667.91667.886775793651670.367916666667-2.481140873015880.0232242063491412
54666.04666.418323412698668.7725-2.35417658730161-0.378323412698478
55666.04666.591240079365667.18875-0.597509920634904-0.55124007936513
56666.27667.738740079365665.6058333333332.13290674603177-1.46874007936503
57664.45665.387549603175664.3604166666671.02713293650794-0.937549603174716
58660.76662.869513888889663.449166666667-0.579652777777761-2.10951388888907
59660.4661.194632936508662.4725-1.27786706349205-0.794632936507924
60660.69661.355228174603661.392083333333-0.0368551587301448-0.665228174603158
61660.69662.298621031746660.271252.02737103174604-1.60862103174611
62662.23662.99445436508658.9579166666674.03653769841269-0.76445436507936
63661.41658.413025793651657.4295833333330.9834424603174682.99697420634914
64659.02653.103561507936655.98375-2.880188492063565.91643849206355
65655.43652.095109126984654.57625-2.481140873015883.33489087301575
66652.59650.628740079365652.982916666667-2.354176587301611.96125992063503
67652.59650.672906746032651.270416666667-0.5975099206349041.91709325396846
68648.2651.605823412698649.4729166666672.13290674603177-3.40582341269828
69645.84648.261716269841647.2345833333331.02713293650794-2.42171626984123
70644.67643.505763888889644.085416666667-0.5796527777777611.16423611111111
71642.71639.258382936508640.53625-1.277867063492053.45161706349211
72640.14637.23939484127637.27625-0.03685515873014482.90060515873017
73640.14636.177787698413634.1504166666672.027371031746043.96221230158721
74639.64635.21695436508631.1804166666674.036537698412694.42304563492064
75630.28629.036359126984628.0529166666670.9834424603174681.24364087301592
76614.57621.548561507936624.42875-2.88018849206356-6.97856150793643
77614.7618.016359126984620.4975-2.48114087301588-3.31635912698403
78615.08614.153740079365616.507916666667-2.354176587301610.926259920634948
79615.08611.986240079365612.58375-0.5975099206349043.09375992063508
80614.43610.825406746032608.69252.132906746031773.60459325396835
81604.55605.892132936508604.8651.02713293650794-1.34213293650794
82598.98600.975763888889601.555416666667-0.579652777777761-1.99576388888897
83594.05597.298799603175598.576666666667-1.27786706349205-3.24879960317458
84593.05595.09064484127595.1275-0.0368551587301448-2.04064484126991
85593.05593.391537698413591.3641666666672.02737103174604-0.341537698412708
86593.34591.620287698413587.583754.036537698412691.71971230158726
87584.72584.786359126984583.8029166666670.983442460317468-0.066359126984139
88580.7576.92564484127579.805833333333-2.880188492063563.77435515873026
89577.08573.191359126984575.6725-2.481140873015883.88864087301602
90569.92569.311656746032571.665833333333-2.354176587301610.608343253968314
91569.92NANA-0.597509920634904NA
92568.86NANA2.13290674603177NA
93559.38NANA1.02713293650794NA
94548.22NANA-0.579652777777761NA
95545.61NANA-1.27786706349205NA
96545.33NANA-0.0368551587301448NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/1w53w1292324186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/1w53w1292324186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/2w53w1292324186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/2w53w1292324186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/3w53w1292324186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/3w53w1292324186.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/47wkz1292324186.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292324103e3qmjin7dlv2cpr/47wkz1292324186.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