Home » date » 2009 » Dec » 04 »

workshop 9,8

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 04 Dec 2009 12:05:12 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9.htm/, Retrieved Fri, 04 Dec 2009 20:06:04 +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/2009/Dec/04/t12599535596n9ccrl3srtruv9.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
611 594 595 591 589 584 573 567 569 621 629 628 612 595 597 593 590 580 574 573 573 620 626 620 588 566 557 561 549 532 526 511 499 555 565 542 527 510 514 517 508 493 490 469 478 528 534 518 506 502 516 528 533 536 537 524 536 587 597 581 564
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1611NANA1.01413185152240NA
2594NANA0.988651500949887NA
3595NANA0.9955518230391NA
4591NANA1.00402060596939NA
5589NANA0.996516403003817NA
6584NANA0.980027776551986NA
7573581.310157476894595.9583333333330.9754208053866650.985704434422816
8567568.757880346414596.0416666666670.9542250351844770.9969092641928
9569568.528119988323596.1666666666670.953639563860761.00083000294108
10621613.247235016046596.3333333333331.028363166600411.01264215236739
11629633.932829159202596.4583333333331.062828354860000.992218687955088
12628624.136249761407596.3333333333331.046623113071111.00619055573213
13612604.633860976416596.2083333333331.014131851522401.01218280929832
14595589.730620316608596.50.9886515009498871.00893523161569
15597594.261475702422596.9166666666670.99555182303911.00460828172370
16593599.442135955641597.0416666666671.004020605969390.989253114572317
17590594.795728042903596.8750.9965164030038170.991937184790007
18580584.504899731881596.4166666666670.9800277765519860.992292793894547
19574580.456664272181595.0833333333330.9754208053866650.988876578270874
20573565.736167734997592.8750.9542250351844771.01283961089864
21573562.6473426778495900.953639563860761.01839990441060
22620603.6491787944425871.028363166600411.02708662875714
23626620.647474723452583.9583333333331.062828354860001.00862409901681
24620607.303061359513580.251.046623113071111.02090708815474
25588584.393479439782576.251.014131851522401.00617139083016
26566565.179108043019571.6666666666670.9886515009498871.00145244568545
27557563.482331840135660.99555182303910.988495944817007
28561562.460710302435560.2083333333331.004020605969390.997403000288412
29549553.025082150326554.9583333333330.9965164030038170.992721700551672
30532538.198587289799549.1666666666670.9800277765519860.988482713563012
31526530.019280126979543.3750.9754208053866650.99241672845181
32511513.850181446841538.50.9542250351844770.994453283175233
33499509.601141938094534.3750.953639563860760.979197177820725
34555545.803750673169530.751.028363166600411.01684900353926
35565560.331965585147527.2083333333331.062828354860001.00833083725641
36542548.299683360129523.8751.046623113071110.988510510672698
37527528.109161680289520.751.014131851522400.997899749217075
38510511.627151741567517.50.9886515009498870.996819653265024
39514512.584744887256514.8750.99555182303911.00276101684036
40517514.937068286551512.8751.004020605969391.00400618219293
41508508.680102216657510.4583333333330.9965164030038170.9986630060549
42493498.017448451168508.1666666666670.9800277765519860.989925155299735
43490493.847425260557506.2916666666670.9754208053866650.992209283548402
44469481.963161521093505.0833333333330.9542250351844770.97310341836048
45478481.429039822374504.8333333333330.953639563860760.992877372283901
46528519.709035320683505.3751.028363166600411.01595308935547
47534538.72112236966506.8751.062828354860000.991236426095763
48518533.472522591622509.7083333333331.046623113071110.970996589446715
49506520.714450262938513.4583333333331.014131851522400.97174180540696
50502511.833120804265517.7083333333330.9886515009498870.980788424186357
51516520.09286488601522.4166666666670.99555182303910.992130511371452
52528529.411698689276527.2916666666671.004020605969390.997333457698855
53533530.520420049157532.3750.9965164030038171.00467386335594
54536526.887433368762537.6250.9800277765519861.01729509199522
55537529.328357056497542.6666666666670.9754208053866651.01449316448143
56524NANA0.954225035184477NA
57536NANA0.95363956386076NA
58587NANA1.02836316660041NA
59597NANA1.06282835486000NA
60581NANA1.04662311307111NA
61564NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/1ws621259953506.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/1ws621259953506.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/2yyh81259953506.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/2yyh81259953506.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/3cbgu1259953506.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/3cbgu1259953506.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/4f4xx1259953506.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599535596n9ccrl3srtruv9/4f4xx1259953506.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