Home » date » 2010 » Aug » 12 »

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: Thu, 12 Aug 2010 08:55: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/Aug/12/t1281603932y5vh9adt9nz05hx.htm/, Retrieved Thu, 12 Aug 2010 11:05:33 +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/12/t1281603932y5vh9adt9nz05hx.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:
Hoes Isabelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
698 697 696 694 714 713 698 688 689 689 690 692 688 679 677 673 694 690 673 659 657 654 644 643 638 626 621 615 640 633 620 610 601 595 585 584 580 574 560 550 580 569 551 536 535 526 517 512 510 501 496 491 524 514 495 479 479 467 451 459 461 460 452 449 483 470 442 419 419 406 393 396 390 389 373 371 407 391 357 327 321 317 300 304 296 296 283 279 319 295 255 227 228 233 210 219 212 209 201 198 245 216 173 144 143 152 127 141 129 127 113 117 174 143 103 81 92 104 81 89
 
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
1698NANA-4.68171296296297NA
2697NANA-3.8946759259259NA
3696NANA-7.76504629629628NA
4694NANA-5.95949074074074NA
5714NANA35.4571759259259NA
6713NANA24.9571759259259NA
7698699.716435185185696.0833333333333.63310185185186-1.71643518518522
8688684.378472222222694.916666666667-10.53819444444453.62152777777771
9689686.28587962963693.375-7.089120370370382.71412037037032
10689686.322916666667691.708333333333-5.385416666666652.67708333333337
11690676.230324074074690-13.769675925925913.7696759259259
12692683.244212962963688.208333333333-4.964120370370388.75578703703707
13688681.52662037037686.208333333333-4.681712962962976.47337962962956
14679680.063657407407683.958333333333-3.8946759259259-1.06365740740728
15677673.65162037037681.416666666667-7.765046296296283.34837962962968
16673672.66550925926678.625-5.959490740740740.334490740740762
17694710.707175925926675.2535.4571759259259-16.7071759259259
18690696.248842592593671.29166666666724.9571759259259-6.24884259259261
19673670.799768518518667.1666666666673.633101851851862.20023148148152
20659652.336805555556662.875-10.53819444444456.66319444444446
21657651.244212962963658.333333333333-7.089120370370385.75578703703695
22654648.197916666667653.583333333333-5.385416666666655.80208333333337
23644635.146990740741648.916666666667-13.76967592592598.85300925925924
24643639.327546296296644.291666666667-4.964120370370383.67245370370381
25638635.02662037037639.708333333333-4.681712962962972.97337962962968
26626631.563657407408635.458333333333-3.8946759259259-5.5636574074075
27621623.318287037037631.083333333333-7.76504629629628-2.31828703703707
28615620.332175925926626.291666666667-5.95949074074074-5.33217592592587
29640656.832175925926621.37535.4571759259259-16.8321759259259
30633641.415509259259616.45833333333324.9571759259259-8.41550925925912
31620615.216435185185611.5833333333333.633101851851864.7835648148149
32610596.461805555556607-10.538194444444513.5381944444445
33601595.202546296296602.291666666667-7.089120370370385.7974537037037
34595591.65625597.041666666667-5.385416666666653.34375
35585578.063657407407591.833333333333-13.76967592592596.93634259259261
36584581.702546296296586.666666666667-4.964120370370382.29745370370381
37580576.443287037037581.125-4.681712962962973.55671296296293
38574571.271990740741575.166666666667-3.89467592592592.72800925925924
39560561.568287037037569.333333333333-7.76504629629628-1.56828703703695
40550557.748842592592563.708333333333-5.95949074074074-7.7488425925925
41580593.45717592592655835.4571759259259-13.4571759259258
42569577.123842592593552.16666666666724.9571759259259-8.1238425925925
43551549.883101851852546.253.633101851851861.11689814814827
44536529.753472222222540.291666666667-10.53819444444456.24652777777783
45535527.494212962963534.583333333333-7.089120370370387.50578703703707
46526524.072916666667529.458333333333-5.385416666666651.92708333333337
47517510.896990740741524.666666666667-13.76967592592596.10300925925924
48512515.077546296296520.041666666667-4.96412037037038-3.07754629629619
49510510.734953703704515.416666666667-4.68171296296297-0.734953703703695
50501506.813657407407510.708333333333-3.8946759259259-5.81365740740733
51496498.234953703704506-7.76504629629628-2.23495370370364
52491495.248842592593501.208333333333-5.95949074074074-4.24884259259255
53524531.45717592592649635.4571759259259-7.45717592592598
54514515.998842592593491.04166666666724.9571759259259-1.99884259259255
55495490.424768518518486.7916666666673.633101851851864.57523148148152
56479472.503472222222483.041666666667-10.53819444444456.49652777777783
57479472.41087962963479.5-7.089120370370386.58912037037038
58467470.53125475.916666666667-5.38541666666665-3.53125
59451458.688657407407472.458333333333-13.7696759259259-7.68865740740739
60459463.952546296296468.916666666667-4.96412037037038-4.95254629629636
61461460.193287037037464.875-4.681712962962970.80671296296299
62460456.271990740741460.166666666667-3.89467592592593.7280092592593
63452447.40162037037455.166666666667-7.765046296296284.59837962962968
64449444.165509259259450.125-5.959490740740744.83449074074082
65483480.623842592593445.16666666666735.45717592592592.37615740740739
66470465.082175925926440.12524.95717592592594.91782407407408
67442438.174768518519434.5416666666673.633101851851863.82523148148147
68419418.086805555556428.625-10.53819444444450.9131944444444
69419415.28587962963422.375-7.089120370370383.71412037037044
70406410.447916666667415.833333333333-5.38541666666665-4.44791666666663
71393395.646990740741409.416666666667-13.7696759259259-2.64699074074076
72396397.994212962963402.958333333333-4.96412037037038-1.99421296296293
73390391.443287037037396.125-4.68171296296297-1.44328703703701
74389384.855324074074388.75-3.89467592592594.14467592592598
75373373.068287037037380.833333333333-7.76504629629628-0.0682870370369528
76371367.082175925926373.041666666667-5.959490740740743.91782407407408
77407400.915509259259365.45833333333335.45717592592596.08449074074076
78391382.707175925926357.7524.95717592592598.29282407407413
79357353.6331018518523503.633101851851863.36689814814821
80327331.670138888889342.208333333333-10.5381944444445-4.67013888888886
81321327.494212962963334.583333333333-7.08912037037038-6.49421296296299
82317321.614583333333327-5.38541666666665-4.61458333333337
83300305.730324074074319.5-13.7696759259259-5.73032407407402
84304306.869212962963311.833333333333-4.96412037037038-2.86921296296293
85296298.90162037037303.583333333333-4.68171296296297-2.90162037037032
86296291.271990740741295.166666666667-3.89467592592594.7280092592593
87283279.359953703704287.125-7.765046296296283.6400462962963
88279273.790509259259279.75-5.959490740740745.20949074074082
89319307.957175925926272.535.457175925925911.0428240740741
90295290.165509259259265.20833333333324.95717592592594.83449074074076
91255261.799768518519258.1666666666673.63310185185186-6.79976851851853
92227240.503472222222251.041666666667-10.5381944444445-13.5034722222222
93228236.91087962963244-7.08912037037038-8.91087962962962
94233231.822916666667237.208333333333-5.385416666666651.17708333333331
95210216.980324074074230.75-13.7696759259259-6.98032407407405
96219219.41087962963224.375-4.96412037037038-0.410879629629591
97212212.984953703704217.666666666667-4.68171296296297-0.984953703703667
98209206.896990740741210.791666666667-3.89467592592592.10300925925924
99201196.02662037037203.791666666667-7.765046296296284.97337962962965
100198190.915509259259196.875-5.959490740740747.08449074074073
101245225.498842592593190.04166666666735.457175925925919.5011574074074
102216208.290509259259183.33333333333324.95717592592597.70949074074076
103173180.258101851852176.6253.63310185185186-7.25810185185185
104144159.211805555556169.75-10.5381944444445-15.2118055555555
105143155.577546296296162.666666666667-7.08912037037038-12.5775462962963
106152150.239583333333155.625-5.385416666666651.76041666666666
107127135.521990740741149.291666666667-13.7696759259259-8.52199074074076
108141138.327546296296143.291666666667-4.964120370370382.67245370370372
109129132.65162037037137.333333333333-4.68171296296297-3.65162037037038
110127127.896990740741131.791666666667-3.8946759259259-0.89699074074079
111113119.27662037037127.041666666667-7.76504629629628-6.27662037037037
112117116.957175925926122.916666666667-5.959490740740740.0428240740740762
113174154.45717592592611935.457175925925919.5428240740741
114143139.873842592593114.91666666666724.95717592592593.12615740740742
115103NANA3.63310185185186NA
11681NANA-10.5381944444445NA
11792NANA-7.08912037037038NA
118104NANA-5.38541666666665NA
11981NANA-13.7696759259259NA
12089NANA-4.96412037037038NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/1o5wm1281603328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/1o5wm1281603328.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/2o5wm1281603328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/2o5wm1281603328.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/3zev71281603328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/3zev71281603328.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/4zev71281603328.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281603932y5vh9adt9nz05hx/4zev71281603328.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