Home » date » 2010 » May » 28 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 28 May 2010 14:43:13 +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/May/28/t1275057809tni8wh9hh7eu1d7.htm/, Retrieved Fri, 28 May 2010 16:43:29 +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/May/28/t1275057809tni8wh9hh7eu1d7.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
562674 599000 668516 597798 579889 668233 499232 215187 555813 586935 546136 571111 634712 639283 712182 621557 621000 675989 501322 220286 560727 602530 626379 605508 646783 658442 712906 687714 723916 707183 629000 237530 613296 730444 734925 651812 676155 748183 810681 729363 701108 790079 594621 230716 617189 691389 701067 705777 747636 773392 813788 766713 728875 749197 680954 241424 680234 708326 694238 772071 795337 788421 889968 797393 751000 821255 691605 290655 727147 868355 812390 799556 843038 847000 941952 804309 840307 871528 656330 370508 742000 847152 731675 898527 778139 856075 938833 813023 783417 828110 657311 310032 780000 860000 780000 807993 895217 856075 893268 875000 835088 934595 832500 300000 791443 900000 781729 880000 875024 992968 976804 968697 871675 1006852 832037 345587 849528 913871 868746 993733
 
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
1562674NANA1.07101513549776NA
2599000NANA1.10765958618702NA
3668516NANA1.18961626296922NA
4597798NANA1.08633471176227NA
5579889NANA1.05292839450835NA
6668233NANA1.12578443852490NA
7499232509447.962776025557211.9166666670.9142804515445870.979946994546102
8215187214645.824668014561891.9583333330.3820055109966151.00252124788741
9555813541779.669720832565389.8333333330.9582409123395361.02590228290847
10586935605460.938230776568199.2083333331.065578637476000.969401926596766
11546136574234.159405255570902.1251.005836437209360.951068464066373
12571111596268.021093624572938.251.040719520984370.957809206256806
13634712614064.921414938573348.51.071015135497761.03362360862022
14639283635406.752449496573648.0416666671.107659586187021.00610041919693
15712182682917.357405491574065.251.189616262969221.04285239242665
16621557624555.32616663574919.7916666671.086334711762270.995199262513646
17621000609553.97952203578913.0416666671.052928394508351.01877769789469
18675989657108.790568807583689.7083333331.125784438524901.02873224297433
19501322535426.289431194585625.8750.9142804515445870.93630441742518
20220286224209.396303399586927.1250.3820055109966150.982501195899525
21560727563211.44640599587755.5833333330.9582409123395360.995588785665058
22602530629269.250526123590542.2916666671.065578637476000.957507457254957
23626379601074.7790026325975871.005836437209361.04209829106348
24605508627735.910343121603174.9166666671.040719520984370.964590347665515
25646783653099.228294551609794.5833333331.071015135497760.99032883822104
26658442682133.3259403136158331.107659586187020.965268775121557
27712906736065.397080068618741.8751.189616262969220.968536223585649
28687714680330.149257666262621.086334711762271.01085333459115
29723916669783.019208483636114.51.052928394508351.08082166797165
30707183723391.460232783642566.5833333331.125784438524900.977593791019365
31629000590368.944601258645719.750.9142804515445871.06543544634590
32237530248564.412327329650682.7916666670.3820055109966150.955607433002928
33613296630997.76788523658495.9583333330.9582409123395360.97194638588888
34730444707869.527562265664305.2916666671.065578637476001.03189072499769
35734925668972.091302388665090.3333333331.005836437209361.09858843075084
36651812694778.107892046675941.040719520984370.938158517944097
37676155717168.380089532669615.5416666671.071015135497760.94281206306891
38748183739804.914564658667899.1666666671.107659586187021.01132472259970
39810681794398.924477584667777.4583333331.189616262969221.02049609462037
40729363723838.261839256666312.3751.086334711762271.00763255889058
41701108698380.378915264663274.3333333331.052928394508351.00390563819816
42790079747647.095760706664112.1251.125784438524901.05675392104094
43594621611963.601251421669339.0416666670.9142804515445870.971660730775562
44230716257230.207344287673367.7916666670.3820055109966150.896924208015743
45617189646379.131596467674547.6250.9582409123395360.954840541456882
46691389720579.793949189676233.3333333331.065578637476000.959489852207475
47701067682909.170525618678946.5416666671.005836437209361.02658893782376
48705777706024.209762424678400.0833333331.040719520984370.99964985653607
49747636728605.036711422680293.8751.071015135497761.02611972513184
50773392758012.715147365684337.251.107659586187021.02028895366174
51813788817754.462299081687410.2916666671.189616262969220.99514956813818
52766713750377.962014964690742.8751.086334711762271.02176908013286
53728875727746.244733987691164.0416666671.052928394508351.00155102863695
54749197780891.088061182693641.751.125784438524900.959412921282182
55680954638525.73406992698391.5416666670.9142804515445871.06644722940083
56241424267787.884654456701005.2916666670.3820055109966150.901549374840184
57680234675373.625048742704805.6666666670.9582409123395361.00719657204693
58708326755770.350855394709258.1666666671.065578637476000.937223852719684
59694238715610.757132763711458.3751.005836437209360.970133544081426
60772071744512.706173855715382.6666666671.040719520984371.03701520954259
61795337769876.604957829718828.8751.071015135497761.03307074780324
62788421798981.397194286721323.9583333331.107659586187020.986782674501097
63889968862864.31445212725329.9583333331.189616262969221.03141129502509
64797393797318.12279864733952.5416666671.086334711762271.00009391132500
65751000785003.832747104745543.4166666671.052928394508350.956683227102078
66821255846152.671239416751611.6251.125784438524900.970575438587287
67691605690048.027975737754744.3750.9142804515445871.00225632414142
68290655290008.158381559759172.7083333330.3820055109966151.00223042559234
69727147731884.764906234763779.50.9582409123395360.993526624499635
70868355816482.226514908766233.6666666671.065578637476001.06353203021517
71812390774738.4329956770242.9583333331.005836437209361.04859906957090
72799556807659.533919043776058.7916666671.040719520984370.989966646119161
73843038831840.007119529776683.7083333331.071015135497761.01346171473436
74847000862358.54034708778541.1251.107659586187020.982190075672124
75941952930859.508598717782487.2083333331.189616262969221.01191639694155
76804309849755.589863298782222.6251.086334711762270.946518045417496
77840307819153.064518046777976.0416666671.052928394508351.02582415472547
78871528876689.667949774778736.7083333331.125784438524900.99411232031302
79656330713281.722810388780156.3750.9142804515445870.920155359391527
80370508297135.489870563777830.3750.3820055109966151.24693283916169
81742000745586.691638482778078.5416666670.9582409123395360.995189437152372
82847152829352.285298343778311.6666666671.065578637476001.02146218804383
83731675780835.18483019776304.3333333331.005836437209360.93704153477551
84898527803565.386686804772124.8333333331.040719520984371.11817534065863
85778139825063.605105973770356.6251.071015135497760.94312607559517
86856075850547.058502257767877.6666666671.107659586187021.00649927766193
87938833912365.684607253766941.1666666671.189616262969221.02900954720161
88813023835456.392372103769059.8333333331.086334711762270.973148338349046
89783417812448.71845408771608.7083333331.052928394508350.96426639885737
90828110866685.1499983977698501.125784438524900.955491160776819
91657311704869.9998010087709560.9142804515445870.932527984146815
92310032296372.959119925775834.250.3820055109966151.04608733846919
93780000741616.859245478773935.7083333330.9582409123395361.05175602506336
94860000825418.035771452774619.5416666671.065578637476001.04189630312140
95780000783903.530791748779354.8751.005836437209360.9950203939153
96807993817948.000376868785944.7083333331.040719520984370.987829299206941
97895217854328.558175882797681.1251.071015135497761.04786032426614
98856075891181.550421528804562.6666666671.107659586187020.960606735625392
99893268957190.772367344804621.4583333331.189616262969220.933218357079176
100875000876416.733206992806764.9166666671.086334711762270.99838349365854
101835088851296.423825432808503.6251.052928394508350.980960305515443
102934595913659.584572603811575.9583333331.125784438524901.02291380266885
103832500743981.888952578813734.8750.9142804515445871.11897885198797
1043e+05312708.708537362818597.3750.3820055109966150.959359275292316
105791443793214.499044836827781.9166666670.9582409123395360.997766683479728
1069e+05889935.714332931835166.6251.065578637476001.01130900300435
107781729845501.20566556840595.1251.005836437209360.924574672113733
108880000879543.592312715845130.2916666671.040719520984371.00051891423151
109875024908351.186369218848121.7083333331.071015135497760.963310240720408
110992968941512.725120694850001.8751.107659586187021.05465170412084
1119768041016314.79977160854321.5416666671.189616262969220.961123463143032
112968697931336.158240401857319.7083333331.086334711762271.040115313283
113871675907122.424070166861523.3751.052928394508350.960923219259516
1141006852979306.326751867869887.9583333331.125784438524901.02812773949852
115832037NANA0.914280451544587NA
116345587NANA0.382005510996615NA
117849528NANA0.958240912339536NA
118913871NANA1.06557863747600NA
119868746NANA1.00583643720936NA
120993733NANA1.04071952098437NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/1rhjy1275057788.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/1rhjy1275057788.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/2rhjy1275057788.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/2rhjy1275057788.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/318i11275057788.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/318i11275057788.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/418i11275057788.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275057809tni8wh9hh7eu1d7/418i11275057788.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