Home » date » 2010 » Aug » 19 »

tijdreeks 1 - 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 09:54:02 +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/t1282211656licg8jwm7599glw.htm/, Retrieved Thu, 19 Aug 2010 11:56:07 +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/t1282211656licg8jwm7599glw.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:
Vanhille Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
568 567 566 564 584 583 568 558 559 559 560 562 563 552 552 555 575 567 548 541 544 546 551 550 546 532 523 528 555 543 525 517 519 521 520 516 509 494 484 482 508 500 480 467 471 482 481 477 471 455 441 434 459 448 432 414 415 423 425 427 415 399 386 377 397 379 361 350 348 363 367 365 354 327 312 307 335 317 298 286 288 303 310 301 293 264 255 251 279 253 233 226 232 245 250 242 230 196 188 181 212 186 166 155 157 173 182 182 168 131 114 106 134 103 83 74 83 96 95 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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1568NANA1.04219741804307NA
2567NANA0.974847589403492NA
3566NANA0.95228299332594NA
4564NANA0.950365479162787NA
5584NANA1.06006438288455NA
6583NANA1.00176063108054NA
7568550.296842047773566.2916666666670.9717551474613021.03217019724545
8558538.936685609178565.4583333333330.9530970786692421.03537208525575
9559548.600458466711564.250.9722648798701121.01895649442648
10559573.814754489773563.2916666666671.018681419317590.974181991010416
11560589.372084129545562.5416666666671.047694986972010.95016376764277
12562592.375758523953561.51.054987993809360.948722144539402
13563583.6305541041225601.042197418043070.964651346714036
14552544.411760032292558.4583333333330.9748475894034921.01393842037369
15552530.540662656715557.1250.952282993325941.04044805394525
16555528.363607852878555.9583333333330.9503654791627871.05041299542821
17575588.379901850211555.0416666666671.060064382884550.977259757160065
18567555.1423497238554.1666666666671.001760631080541.02135965718
19548537.340106748289552.9583333333330.9717551474613021.01983826094095
20541525.553614129531551.4166666666670.9530970786692421.02939069479344
21544534.138018378643549.3750.9722648798701121.01846335831195
22546557.261181425862547.0416666666671.018681419317590.979791914812641
23551571.081075815326545.0833333333331.047694986972010.964836733931944
24550573.122227636932543.251.054987993809360.959655678105055
25546564.132777408232541.2916666666671.042197418043070.967857252522112
26532525.76779988495539.3333333333330.9748475894034921.01185352187109
27523511.653716622417537.2916666666670.952282993325941.02217570792309
28528508.64352416025535.2083333333330.9503654791627871.03805509147434
29555564.881808029603532.8751.060064382884550.982506414812556
30543531.100094577867530.1666666666671.001760631080541.02240614442291
31525512.31741170116527.2083333333330.9717551474613021.02475533333276
32517499.502293979239524.0833333333330.9530970786692421.03503028160565
33519506.428469302345520.8750.9722648798701121.02482390201122
34521526.997854260302517.3333333333331.018681419317590.988618826031616
35520537.947721852336513.4583333333331.047694986972010.96663668025113
36516537.736172011244509.7083333333331.054987993809360.959578371062624
37509527.395318422214506.0416666666671.042197418043070.965120436644666
38494489.45472717967502.0833333333330.9748475894034921.00928640090274
39484474.2369306763184980.952282993325941.02058690222577
40482469.836933761103494.3750.9503654791627871.02588784611191
41508520.624120044174491.1251.060064382884550.975751949327468
42500488.73396788842487.8751.001760631080541.02305146122799
43480470.977328136244484.6666666666670.9717551474613021.01915733799642
44467458.876531000962481.4583333333330.9530970786692421.01770295155718
45471464.783123614575478.0416666666670.9722648798701121.01337586514992
46482483.109663111369474.251.018681419317590.997703082351485
47481492.634913665797470.2083333333331.047694986972010.976382279568415
48477491.624405115164661.054987993809360.970252890289826
49471481.321507566227461.8333333333331.042197418043070.97855589786873
50455446.114628100773457.6250.9748475894034921.01991723951545
51441431.463552892762453.0833333333330.952282993325941.02210255546106
52434426.040924596351448.2916666666670.9503654791627871.01868148091921
53459470.138553809297443.51.060064382884550.97630793365265
54448439.856397096948439.0833333333331.001760631080541.01851423090991
55432422.389570763179434.6666666666670.9717551474613021.02275252492493
56414409.8317438277744300.9530970786692421.01017065231037
57415413.577173274749425.3750.9722648798701121.00344029317185
58423428.567762118739420.7083333333331.018681419317590.987008443912782
59425435.579190833613415.751.047694986972010.975712359414218
60427432.852782293364410.2916666666671.054987993809360.986478584560889
61415421.525430706005404.4583333333331.042197418043070.984519485111311
62399388.801713573759398.8333333333330.9748475894034921.02623004495659
63386374.604322499592393.3750.952282993325941.03042057129605
64377368.821003038425388.0833333333330.9503654791627871.02217606072917
65397406.181336041929383.1666666666671.060064382884550.97739596769414
66379378.832478653625378.1666666666671.001760631080541.00044220428768
67361362.505159800877373.0416666666670.9717551474613020.995847894132863
68350350.263176410947367.50.9530970786692420.99924863237511
69348351.392731999723361.4166666666670.9722648798701120.99034489990611
70363362.056354449128355.4166666666671.018681419317591.00260634992115
71367366.605937524622349.9166666666671.047694986972011.00107489387116
72365363.707110865775344.751.054987993809361.00355475352447
73354353.869448318042339.5416666666671.042197418043071.00036892611831
74327325.842806758117334.250.9748475894034921.00355138495582
75312313.380461720345329.0833333333330.952282993325940.995594933670189
76307307.997612372007324.0833333333330.9503654791627870.996760973683128
77335338.381384886605319.2083333333331.060064382884550.990007178179325
78317314.71979826447314.1666666666671.001760631080541.0072451804688
79298300.231850767731308.9583333333330.9717551474613020.992566242515495
80286289.54295002406303.7916666666670.9530970786692420.987763646036743
81288290.504643897857298.7916666666670.9722648798701120.991378299967081
82303299.577227397649294.0833333333331.018681419317591.01142534308126
83310303.220390812816289.4166666666671.047694986972011.02235868494533
84301300.056168572611284.4166666666671.054987993809361.00314551582752
85293290.816504526436279.0416666666671.042197418043071.0075081552786
86264266.945764898323273.8333333333330.9748475894034920.988964931137061
87255256.1641252046782690.952282993325940.995455549430476
88251251.134077868767264.250.9503654791627870.999466110414387
89279274.910029961393259.3333333333331.060064382884551.01487748569662
90253254.822860531113254.3751.001760631080540.992846558086219
91233242.25046030254249.2916666666670.9717551474613020.961814477912704
92226232.396837682184243.8333333333330.9530970786692420.972474506340178
93232231.601596592393238.2083333333330.9722648798701121.00172021010852
94245236.843429991341232.51.018681419317591.03443865852204
95250237.608492253693226.7916666666671.047694986972011.05215094641094
96242233.372135797245221.2083333333331.054987993809361.03697041282705
97230224.723818265538215.6251.042197418043071.02347851587422
98196204.596137826058209.8750.9748475894034920.957984848016212
99188194.067338348216203.7916666666670.952282993325940.968735911978506
100181187.855576381178197.6666666666670.9503654791627870.963506133204867
101212203.355684116686191.8333333333331.060064382884551.04250835633566
102186186.828357696521186.51.001760631080540.995566210040412
103166176.292579668605181.4166666666670.9717551474613020.941616489542824
104155167.86422298062176.1250.9530970786692420.923365308269974
105157165.609117871209170.3333333333330.9722648798701120.948015435491274
106173167.1910879455164.1251.018681419317591.03474414890101
107182165.273884194834157.751.047694986972011.10120241250849
108182159.347144898288151.0416666666671.054987993809361.14216040780757
109168150.206702875458144.1251.042197418043071.11845874241241
110131133.838450295188137.2916666666670.9748475894034920.978791966815758
111114124.590358293477130.8333333333330.952282993325940.914998572614012
112106118.360100717399124.5416666666670.9503654791627870.895572066579174
113134124.778411735369117.7083333333331.060064382884551.07390371568592
114103110.86150983958110.6666666666671.001760631080540.929087111920487
11583NANA0.971755147461302NA
11674NANA0.953097078669242NA
11783NANA0.972264879870112NA
11896NANA1.01868141931759NA
11995NANA1.04769498697201NA
120100NANA1.05498799380936NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/17p5b1282211628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/17p5b1282211628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/27p5b1282211628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/27p5b1282211628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/3hy4e1282211628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/3hy4e1282211628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/4splh1282211628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/19/t1282211656licg8jwm7599glw/4splh1282211628.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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