Home » date » 2010 » Jan » 25 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 25 Jan 2010 05:17:39 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus.htm/, Retrieved Mon, 25 Jan 2010 13:18:28 +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/2010/Jan/25/t1264421902zjkq8y5lcd7clus.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 «
441700 448500 415600 408000 416600 409300 387600 394500 407600 378500 359600 435700 433800 427700 413300 379500 379300 353700 378200 380600 394000 374000 375000 437600 443900 488800 463900 440000 453800 451600 453400 461400 509100 540600 555100 677400 694600 750100 733900 709300 720500 693200 687200 686800 720900 653100 624700 690000 717800 736500 699900 675600 635600 632500 594900 604000 620800 578400 571200 627400 657700 674100 672800 615300 609100 607600 566900 572700 589200 534800 543100 591100 624800 665300 642600 608700 594500 563800 596100 597600 633100 591000 584200 655800 670700 699700 712900 652000 635100 603100 610100 602000 597600 585400 567100 620600 646200 644800 645200 644800 593000 569100 518800 538700 554600 507900 488400 563300 592400 598100 546300 516100 518500 477400 483400 469400 501300 457400 446700 501900 550400 593700 548900 534200 550500 541800 569300 587400 etc...
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1441700NANA45799.3551587301NA
2448500NANA71209.7718253968NA
3415600NANA43249.6527777778NA
4408000NANA9810.36706349205NA
5416600NANA-3337.54960317459NA
6409300NANA-24941.121031746NA
7387600377837.450396825408270.833333333-30433.38293650809762.54960317467
8394500377241.617063492407075-29833.382936507917258.382936508
9407600400659.771825397406112.5-5452.728174603176940.2281746032
10378500360332.688492063404829.166666667-44496.478174603218167.3115079365
11359600352980.902777778402087.5-49106.59722222226619.09722222225
12435700415748.759920635398216.66666666717532.093253968319951.2400793650
13433800441307.688492063395508.33333333345799.3551587301-7507.68849206349
14427700465747.271825397394537.571209.7718253968-38047.2718253968
15413300436641.319444444393391.66666666743249.6527777778-23341.3194444444
16379500402447.867063492392637.59810.36706349205-22947.867063492
17379300389754.117063492393091.666666667-3337.54960317459-10454.1170634920
18353700368871.378968254393812.5-24941.121031746-15171.3789682540
19378200363879.117063492394312.5-30433.382936508014320.882936508
20380600367445.783730159397279.166666667-29833.382936507913154.2162698413
21394000396480.60515873401933.333333333-5452.72817460317-2480.60515873006
22374000362066.021825397406562.5-44496.478174603211933.9781746031
23375000363080.902777778412187.5-49106.597222222211919.0972222222
24437600436902.926587302419370.83333333317532.0932539683697.073412698403
25443900472382.688492063426583.33333333345799.3551587301-28482.6884920634
26488800504293.10515873433083.33333333371209.7718253968-15493.1051587301
27463900484495.486111111441245.83333333343249.6527777778-20595.4861111111
28440000462793.700396825452983.3333333339810.36706349205-22793.7003968253
29453800464091.617063492467429.166666667-3337.54960317459-10291.6170634921
30451600459983.878968254484925-24941.121031746-8383.8789682539
31453400474929.117063492505362.5-30433.3829365080-21529.1170634920
32461400496862.450396825526695.833333333-29833.3829365079-35462.4503968253
33509100543380.60515873548833.333333333-5452.72817460317-34280.6051587301
34540600526807.688492063571304.166666667-44496.478174603213792.3115079366
35555100544530.902777778593637.5-49106.597222222210569.0972222222
36677400632348.759920635614816.66666666717532.093253968345051.2400793652
37694600680424.3551587363462545799.355158730114175.6448412699
38750100724968.10515873653758.33333333371209.771825396825131.8948412699
39733900715224.65277777867197543249.652777777818675.3472222224
40709300695297.867063492685487.59810.3670634920514002.1329365079
41720500689737.450396825693075-3337.5496031745930762.5496031746
42693200671558.878968254696500-24941.12103174621641.1210317459
43687200667558.283730159697991.666666667-30433.382936508019641.7162698412
44686800668558.283730159698391.666666667-29833.382936507918241.7162698412
45720900690955.60515873696408.333333333-5452.7281746031729944.3948412699
46653100649091.021825397693587.5-44496.47817460324008.97817460343
47624700639539.236111111688645.833333333-49106.5972222222-14839.236111111
48690000700111.259920635682579.16666666717532.0932539683-10111.2599206349
49717800722003.521825397676204.16666666745799.3551587301-4203.52182539692
50736500740118.10515873668908.33333333371209.7718253968-3618.10515873006
51699900704537.152777778661287.543249.6527777778-4637.15277777787
52675600663814.533730159654004.1666666679810.3670634920511785.4662698412
53635600645324.950396825648662.5-3337.54960317459-9724.95039682544
54632500618883.878968254643825-24941.12103174613616.1210317462
55594900608279.117063492638712.5-30433.3829365080-13379.1170634921
56604000603774.950396825633608.333333333-29833.3829365079225.049603174673
57620800624426.438492063629879.166666667-5452.72817460317-3626.43849206343
58578400581741.021825397626237.5-44496.4781746032-3341.02182539669
59571200573514.236111111622620.833333333-49106.5972222222-2314.23611111101
60627400638011.259920635620479.16666666717532.0932539683-10611.2599206349
61657700664074.3551587361827545799.3551587301-6374.35515873018
62674100687013.938492063615804.16666666771209.7718253968-12913.9384920634
63672800656432.986111111613183.33333333343249.652777777816367.013888889
64615300619860.3670634926100509810.36706349205-4560.36706349207
65609100603724.950396825607062.5-3337.549603174595375.04960317456
66607600579438.045634921604379.166666667-24941.12103174628161.9543650794
67566900571062.450396825601495.833333333-30433.3829365080-4162.45039682533
68572700569924.950396825599758.333333333-29833.38293650792775.04960317467
69589200592680.60515873598133.333333333-5452.72817460317-3480.60515873018
70534800552103.521825397596600-44496.4781746032-17303.5218253968
71543100546610.069444444595716.666666667-49106.5972222222-3510.06944444438
72591100610815.426587302593283.33333333317532.0932539683-19715.4265873015
73624800638474.3551587359267545799.3551587301-13674.3551587303
74665300666138.938492064594929.16666666771209.7718253968-838.93849206355
75642600641045.486111111597795.83333333343249.65277777781554.51388888899
76608700611777.033730159601966.6666666679810.36706349205-3077.03373015882
77594500602683.283730159606020.833333333-3337.54960317459-8183.28373015882
78563800585488.04563492610429.166666667-24941.121031746-21688.0456349205
79596100584604.117063492615037.5-30433.382936508011495.8829365079
80597600588549.950396825618383.333333333-29833.38293650799050.04960317456
81633100617293.10515873622745.833333333-5452.7281746031715806.8948412699
82591000582982.688492063627479.166666667-44496.47817460328017.31150793657
83584200581868.402777778630975-49106.59722222222331.59722222225
84655800651836.259920635634304.16666666717532.09325396833963.74007936509
85670700682324.3551587363652545799.3551587301-11624.3551587302
86699700708501.438492063637291.66666666771209.7718253968-8801.43849206343
87712900679245.486111111635995.83333333343249.652777777833654.513888889
88652000644093.700396825634283.3333333339810.367063492057906.29960317456
89635100629999.950396825633337.5-3337.549603174595100.04960317467
90603100606217.212301587631158.333333333-24941.121031746-3117.21230158722
91610100598237.450396825628670.833333333-30433.382936508011862.5496031746
92602000595529.117063492625362.5-29833.38293650796470.88293650793
93597600614801.438492063620254.166666667-5452.72817460317-17201.4384920634
94585400572636.85515873617133.333333333-44496.478174603212763.1448412699
95567100565972.569444444615079.166666667-49106.59722222221127.43055555562
96620600629440.426587302611908.33333333317532.0932539683-8840.42658730154
97646200652486.85515873606687.545799.3551587301-6286.85515873018
98644800671455.60515873600245.83333333371209.7718253968-26655.6051587302
99645200639066.319444444595816.66666666743249.65277777786133.68055555562
100644800600606.200396825590795.8333333339810.3670634920544193.7996031747
101593000580949.950396825584287.5-3337.5496031745912050.0496031747
102569100553679.712301587578620.833333333-24941.12103174615420.2876984127
103518800543558.283730159573991.666666667-30433.3829365080-24758.2837301587
104538700539970.783730159569804.166666667-29833.3829365079-1270.7837301587
105554600558284.771825397563737.5-5452.72817460317-3684.77182539681
106507900509757.688492063554254.166666667-44496.4781746032-1857.68849206343
107488400496680.902777778545787.5-49106.5972222222-8280.90277777775
108563300556394.593253968538862.517532.09325396836905.40674603172
109592400579366.021825397533566.66666666745799.355158730113033.9781746032
110598100600413.938492064529204.16666666771209.7718253968-2313.93849206355
111546300567345.486111111524095.83333333343249.6527777778-21045.4861111111
112516100529581.200396825519770.8333333339810.36706349205-13481.2003968254
113518500512591.617063492515929.166666667-3337.549603174595908.38293650799
114477400486692.212301587511633.333333333-24941.121031746-9292.21230158722
115483400476891.617063492507325-30433.38293650806508.38293650805
116469400475558.283730159505391.666666667-29833.3829365079-6158.28373015864
117501300499863.938492063505316.666666667-5452.728174603171436.06150793663
118457400461682.688492063506179.166666667-44496.4781746032-4282.68849206349
119446700459160.069444444508266.666666667-49106.5972222222-12460.0694444445
120501900529815.426587302512283.33333333317532.0932539683-27915.4265873017
121550400564345.188492064518545.83333333345799.3551587301-13945.1884920635
122593700598251.438492064527041.66666666771209.7718253968-4551.43849206355
123548900580474.65277777853722543249.6527777778-31574.6527777778
124534200558535.3670634925487259810.36706349205-24335.3670634922
125550500559237.450396825562575-3337.54960317459-8737.45039682544
126541800553696.378968254578637.5-24941.121031746-11896.3789682540
127569300565704.117063492596137.5-30433.38293650803595.88293650781
128587400584462.450396825614295.833333333-29833.38293650792937.54960317467
129627700629434.771825397634887.5-5452.72817460317-1734.77182539681
130607000615299.35515873659795.833333333-44496.4781746032-8299.35515873006
131629500635014.236111111684120.833333333-49106.5972222222-5514.23611111101
132704600721819.593253968704287.517532.0932539683-17219.5932539683
133767700769032.688492064723233.33333333345799.3551587301-1332.68849206367
134812200813234.77182539774202571209.7718253968-1034.77182539692
135824600804362.152777778761112.543249.652777777820237.8472222222
136856300789010.3670634927792009810.3670634920567289.632936508
137812200791804.117063492795141.666666667-3337.5496031745920395.8829365080
138764100787046.378968254811987.5-24941.121031746-22946.3789682540
139801700798566.617063492829000-30433.38293650803133.38293650793
140806000814895.783730159844729.166666667-29833.3829365079-8895.7837301587
141867200852193.10515873857645.833333333-5452.7281746031715006.8948412698
142801600820611.85515873865108.333333333-44496.4781746032-19011.8551587301
143817500822785.069444444871891.666666667-49106.5972222222-5285.06944444426
144920900900186.259920635882654.16666666717532.093253968320713.7400793652
145959700939899.3551587389410045799.355158730119800.6448412701
146997700974684.77182539790347571209.771825396823015.2281746033
147949100953362.152777778910112.543249.6527777778-4262.15277777764
148910900926581.200396825916770.8333333339810.36706349205-15681.2003968252
149920400920879.117063492924216.666666667-3337.54960317459-479.117063491954
150914200904975.54563492929916.666666667-24941.1210317469224.45436507952
151926300904024.950396825934458.333333333-30433.382936508022275.0496031747
152906400908629.117063492938462.5-29833.3829365079-2229.11706349207
153926100936209.771825397941662.5-5452.72817460317-10109.7718253968
154902500898891.021825397943387.5-44496.47817460323608.97817460319
155895300894855.902777778943962.5-49106.5972222222444.097222222248
156979900961636.259920635944104.16666666717532.093253968318263.7400793650
1571009700988474.3551587394267545799.355158730121225.6448412697
15810438001012843.10515873941633.33333333371209.771825396830956.8948412698
159979800985516.319444444942266.66666666743249.6527777778-5716.3194444445
160921600952306.200396825942495.8333333339810.36706349205-30706.2003968254
161923500939087.450396825942425-3337.54960317459-15587.4503968254
162914500915817.212301587940758.333333333-24941.121031746-1317.21230158722
163891700907491.617063492937925-30433.3829365080-15791.6170634922
164916000905320.783730159935154.166666667-29833.382936507910679.2162698413
165931700926888.938492064932341.666666667-5452.728174603174811.06150793645
166902400884970.188492064929466.666666667-44496.478174603217429.8115079365
167893700875693.402777778924800-49106.597222222218006.5972222222
168941500936127.926587302918595.83333333317532.09325396835372.07341269846
169980100957599.3551587391180045799.355158730122500.6448412699
1701006900974430.60515873903220.83333333371209.771825396832469.3948412699
171949200937345.486111111894095.83333333343249.652777777811854.5138888889
172883200893489.533730159883679.1666666679810.36706349205-10289.5337301588
173849900868729.117063492872066.666666667-3337.54960317459-18829.1170634922
174839200836146.378968254861087.5-24941.1210317463053.62103174604
175803900819808.283730159850241.666666667-30433.3829365080-15908.2837301587
176797900810112.450396825839945.833333333-29833.3829365079-12212.4503968253
177830800823901.438492063829354.166666667-5452.728174603176898.56150793657
178753300773453.521825397817950-44496.4781746032-20153.5218253968
179764100758989.236111111808095.833333333-49106.59722222225110.76388888899
180807600816848.759920635799316.66666666717532.0932539683-9248.7599206348
181853700NA790620.833333333NANA
182886200NA783525NANA
183815700NANANANA
184743000NANANANA
185753600NANANANA
186724800NANANANA
187709600NANANANA
188721900NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/1g8o11264421856.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/1g8o11264421856.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/2skv31264421856.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/2skv31264421856.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/37k831264421856.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/37k831264421856.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/425wx1264421856.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t1264421902zjkq8y5lcd7clus/425wx1264421856.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