Home » date » 2010 » Aug » 19 »

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, 19 Aug 2010 16:32:38 +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/19/t1282235663h9slvf8acn64mfy.htm/, Retrieved Thu, 19 Aug 2010 18:34:23 +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/19/t1282235663h9slvf8acn64mfy.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:
Gilian Keirsebelik
 
Dataseries X:
» Textbox « » Textfile « » CSV «
668 667 666 664 684 683 668 658 659 659 660 662 659 655 655 655 674 674 665 644 638 648 641 637 651 649 652 650 661 666 652 624 613 623 615 613 621 612 611 609 631 632 624 596 584 587 581 574 593 582 571 572 594 588 571 546 535 537 527 515 545 538 520 523 541 529 504 473 455 458 450 442 469 455 439 443 461 451 425 393 366 359 351 343 366 355 344 351 367 364 353 313 278 274 261 255 274 262 265 274 291 289 277 238 203 198 190 187 201 181 181 196 207 202 186 154 120 107 99 100
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1668NANA3.03163580246915NA
2667NANA-2.40354938271604NA
3666NANA-3.24151234567901NA
4664NANA5.69830246913583NA
5684NANA27.9621913580247NA
6683NANA29.6057098765432NA
7668682.568672839506666.12516.4436728395061-14.5686728395062
8658657.883487654321665.25-7.366512345679030.116512345678984
9659644.309413580247664.291666666667-19.982253086419714.690586419753
10659649.221450617284663.458333333333-14.23688271604949.77854938271616
11660645.360339506173662.666666666667-17.306327160493814.6396604938271
12662643.670524691358661.875-18.20447530864218.3294753086420
13659664.406635802469661.3753.03163580246915-5.40663580246917
14655658.26311728395660.666666666667-2.40354938271604-3.26311728395046
15655655.966820987654659.208333333333-3.24151234567901-0.966820987654273
16655663.573302469136657.8755.69830246913583-8.57330246913568
17674684.587191358025656.62527.9621913580247-10.5871913580246
18674684.39737654321654.79166666666729.6057098765432-10.3973765432099
19665669.860339506173653.41666666666716.4436728395061-4.86033950617298
20644645.466820987654652.833333333333-7.36651234567903-1.46682098765439
21638632.476080246914652.458333333333-19.98225308641975.52391975308637
22648637.88811728395652.125-14.236882716049410.1118827160495
23641634.068672839506651.375-17.30632716049386.93132716049377
24637632.295524691358650.5-18.2044753086424.70447530864215
25651652.656635802469649.6253.03163580246915-1.65663580246905
26649645.846450617284648.25-2.403549382716043.15354938271616
27652643.133487654321646.375-3.241512345679018.86651234567898
28650649.989969135802644.2916666666675.698302469135830.0100308641975744
29661670.128858024691642.16666666666727.9621913580247-9.12885802469145
30666669.689043209876640.08333333333329.6057098765432-3.68904320987644
31652654.27700617284637.83333333333316.4436728395061-2.27700617283949
32624627.675154320988635.041666666667-7.36651234567903-3.67515432098764
33613611.809413580247631.791666666667-19.98225308641971.19058641975323
34623614.13811728395628.375-14.23688271604948.86188271604942
35615608.110339506173625.416666666667-17.30632716049386.88966049382714
36613604.545524691358622.75-18.2044753086428.45447530864203
37621623.198302469136620.1666666666673.03163580246915-2.19830246913580
38612615.429783950617617.833333333333-2.40354938271604-3.42978395061732
39611612.216820987654615.458333333333-3.24151234567901-1.21682098765427
40609618.448302469136612.755.69830246913583-9.4483024691358
41631637.795524691358609.83333333333327.9621913580247-6.79552469135808
42632636.39737654321606.79166666666729.6057098765432-4.39737654320982
43624620.44367283950660416.44367283950613.55632716049388
44596594.216820987654601.583333333333-7.366512345679031.78317901234561
45584578.684413580247598.666666666667-19.98225308641975.315586419753
46587581.221450617284595.458333333333-14.23688271604945.77854938271605
47581575.068672839506592.375-17.30632716049385.93132716049377
48574570.795524691358589-18.2044753086423.20447530864192
49593587.989969135803584.9583333333333.031635802469155.01003086419746
50582578.263117283951580.666666666667-2.403549382716043.73688271604931
51571573.300154320988576.541666666667-3.24151234567901-2.30015432098776
52572578.114969135802572.4166666666675.69830246913583-6.11496913580243
53594596.045524691358568.08333333333327.9621913580247-2.04552469135808
54588592.980709876543563.37529.6057098765432-4.98070987654307
55571575.360339506173558.91666666666716.4436728395061-4.36033950617275
56546547.716820987654555.083333333333-7.36651234567903-1.71682098765439
57535531.14274691358551.125-19.98225308641973.85725308641986
58537532.721450617284546.958333333333-14.23688271604944.27854938271605
59527525.40200617284542.708333333333-17.30632716049381.59799382716051
60515519.837191358025538.041666666667-18.204475308642-4.8371913580246
61545535.823302469136532.7916666666673.031635802469159.1766975308642
62538524.554783950617526.958333333333-2.4035493827160413.4452160493828
63520517.341820987654520.583333333333-3.241512345679012.65817901234573
64523519.656635802469513.9583333333335.698302469135833.34336419753095
65541535.420524691358507.45833333333327.96219135802475.57947530864203
66529530.814043209876501.20833333333329.6057098765432-1.8140432098765
67504511.44367283950649516.4436728395061-7.443672839506
68473481.008487654321488.375-7.36651234567903-8.0084876543209
69455461.559413580247481.541666666667-19.9822530864197-6.55941358024688
70458460.596450617284474.833333333333-14.2368827160494-2.59645061728389
71450450.860339506173468.166666666667-17.3063271604938-0.860339506172863
72442443.378858024691461.583333333333-18.204475308642-1.37885802469140
73469458.073302469136455.0416666666673.0316358024691510.9266975308641
74455446.013117283951448.416666666667-2.403549382716048.98688271604942
75439438.133487654321441.375-3.241512345679010.866512345679041
76443439.239969135802433.5416666666675.698302469135833.76003086419757
77461453.253858024691425.29166666666727.96219135802477.74614197530872
78451446.64737654321417.04166666666729.60570987654324.35262345679013
79425425.068672839506408.62516.4436728395061-0.0686728395061778
80393392.800154320988400.166666666667-7.366512345679030.199845679012412
81366372.059413580247392.041666666667-19.9822530864197-6.05941358024694
82359370.013117283951384.25-14.2368827160494-11.0131172839506
83351359.193672839506376.5-17.3063271604938-8.19367283950612
84343350.753858024691368.958333333333-18.204475308642-7.7538580246914
85366365.364969135802362.3333333333333.031635802469150.635030864197518
86355353.596450617284356-2.403549382716041.40354938271599
87344345.758487654321349-3.24151234567901-1.75848765432102
88351347.489969135802341.7916666666675.698302469135833.51003086419752
89367362.462191358025334.527.96219135802474.53780864197529
90364356.689043209877327.08333333333329.60570987654327.31095679012338
91353336.027006172839319.58333333333316.443672839506116.9729938271606
92313304.508487654321311.875-7.366512345679038.49151234567898
93278284.726080246914304.708333333333-19.9822530864197-6.72608024691357
94274283.971450617284298.208333333333-14.2368827160494-9.97145061728395
95261274.527006172839291.833333333333-17.3063271604938-13.5270061728395
96255267.337191358025285.541666666667-18.204475308642-12.3371913580247
97274282.281635802469279.253.03163580246915-8.28163580246911
98262270.554783950617272.958333333333-2.40354938271604-8.55478395061732
99265263.466820987654266.708333333333-3.241512345679011.53317901234561
100274266.114969135803260.4166666666675.698302469135837.88503086419746
101291282.253858024691254.29166666666727.96219135802478.7461419753086
102289278.105709876543248.529.605709876543210.8942901234567
103277259.068672839506242.62516.443672839506117.9313271604939
104238228.841820987654236.208333333333-7.366512345679039.1581790123457
105203209.351080246914229.333333333333-19.9822530864197-6.35108024691357
106198208.346450617284222.583333333333-14.2368827160494-10.3464506172840
107190198.527006172840215.833333333333-17.3063271604938-8.52700617283952
108187190.503858024691208.708333333333-18.204475308642-3.50385802469131
109201204.323302469136201.2916666666673.03163580246915-3.32330246913577
110181191.596450617284194-2.40354938271604-10.5964506172839
111181183.800154320988187.041666666667-3.24151234567901-2.80015432098764
112196185.489969135803179.7916666666675.6983024691358310.5100308641975
113207200.170524691358172.20833333333327.96219135802476.829475308642
114202194.39737654321164.79166666666729.60570987654327.60262345679013
115186NANA16.4436728395061NA
116154NANA-7.36651234567903NA
117120NANA-19.9822530864197NA
118107NANA-14.2368827160494NA
11999NANA-17.3063271604938NA
120100NANA-18.204475308642NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/1r0c81282235553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/1r0c81282235553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/2r0c81282235553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/2r0c81282235553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/319bb1282235553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/319bb1282235553.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/419bb1282235553.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282235663h9slvf8acn64mfy/419bb1282235553.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