Home » date » 2011 » May » 16 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 16 May 2011 18:41:33 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0.htm/, Retrieved Mon, 16 May 2011 20:38:20 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1686 1591 2304 1712 1471 1377 1966 2453 1984 2596 4087 5179 1530 1523 1633 1976 1170 1480 1781 2472 1981 2273 3857 4551 1510 1329 1518 1790 1537 1449 1954 1897 1706 2514 3593 4524 1609 1638 2030 1375 1320 1245 1600 2298 2191 2511 3440 4923 1609 1435 2061 1789 1567 1404 1597 3159 1759 2504 4273 5274 1771 1682 1846 1589 1896 1379 1645 2512 1771 3727 4388 5434 1606 1523 1577 1605 1765 1403 2584 3318 1562 2349 3987 5891 1389 1442 1548 1935 1518 1250 1847 1930 2638 3114 4405 7242 1853 1779 2108 2336 1728 1661 2230 1645 2421 3740 4988 6757 1757 1394 1982 1650 1654 1406 1971 1968 2608 3845 4514 6694 1720 1321 1859 1628 1615 1457 1899 1605 2424 3116 4286 6047 1902 2049 1874 1279 1432 1540 2214 1857 2408 3252 3627 6153 1577 1667 1993 1997 1783 1625 2076 1773 2377 3088 4096 6119 1494 1564 1898 2121 1831 1515 2048 2795 1749 3339 4227 6410 1197 1968 1720 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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11686NANA0.663828180971503NA
21591NANA0.658211442193482NA
32304NANA0.756288050833924NA
41712NANA0.729240132418508NA
51471NANA0.659604458920309NA
61377NANA0.602550505305659NA
719661903.244306704562360.666666666670.8062317029248371.03297300986235
824532136.264348101022351.333333333330.9085331789485491.14826613203583
919842078.742767907682320.541666666670.8958006648911790.954423043884816
1025962875.035799597822303.583333333331.248071106434680.902945278233804
1140873870.832288495112302.041666666671.681477943924461.05584527961787
1251795482.53512779392293.791666666672.390162632232910.94463599033682
1315301520.415469992612290.3750.6638281809715031.00630388877025
1415231502.998402772062283.458333333330.6582114421934821.01330779672889
1516331727.456444111042284.1250.7562880508339240.945320506092618
1619761655.770105661742270.541666666670.7292401324185081.19340238916216
1711701482.461021423392247.50.6596044589203090.789228170651406
1814801332.691080109792211.750.6025505053056591.11053493348066
1917811761.414712965042184.750.8062317029248371.0111190663339
2024721976.816775195552175.833333333330.9085331789485491.25049525632211
2119811937.579513131922162.958333333330.8958006648911791.0224096541968
2222732683.872908462242150.416666666671.248071106434680.846910445287196
2338573628.5593414082157.958333333331.681477943924461.06295629672777
2445515191.33364710022171.958333333332.390162632232910.876653343701406
2515101445.734799633312177.8750.6638281809715031.04445158294798
2613291422.477203010392161.1250.6582114421934820.934285623128045
2715181607.64781205812125.708333333330.7562880508339240.94423665968025
2817901549.118736295532124.291666666670.7292401324185081.15549567509621
2915371400.560134440792123.333333333330.6596044589203091.09741807024494
3014491272.109648055522111.208333333330.6025505053056591.13905275556621
3119541704.541784921212114.208333333330.8062317029248371.14634913458007
3218971936.273482084972131.208333333330.9085331789485490.979716975701861
3317061939.781689766442165.416666666670.8958006648911790.879480412151644
3425142707.638262447272169.458333333331.248071106434680.928484441539746
3535933603.617418573122143.1251.681477943924460.99705367764114
3645245080.48985503042125.583333333332.390162632232910.890465315174403
3716091395.588112462422102.333333333330.6638281809715031.15291896343329
3816381385.068852712392104.291666666670.6582114421934821.18261268874272
3920301619.370276846022141.208333333330.7562880508339241.25357370641244
4013751576.100621195022161.291666666670.7292401324185080.87240622934179
4113201421.310191377662154.791666666670.6596044589203090.928720562202218
4212451304.546950257812165.041666666670.6025505053056590.95435430649235
4316001758.928831881022181.666666666670.8062317029248370.909644535355613
4422981974.431875600812173.208333333330.9085331789485491.16387910284356
4521911940.3415651822166.041666666670.8958006648911791.12918263429279
4625112726.515337932092184.583333333331.248071106434680.920955758093938
4734403719.639396703912212.1251.681477943924460.924820831569936
4849235327.772097356822229.041666666672.390162632232910.924026011255692
4916091484.015558069342235.541666666670.6638281809715031.08422043909921
5014351494.99016355872271.291666666670.6582114421934820.95987253627415
5120611731.269396367322289.166666666670.7562880508339241.19045597659413
5217891656.013185705882270.8750.7292401324185081.08030540785666
5315671520.580662445162305.291666666670.6596044589203091.03052737595662
5414041418.780483555342354.6250.6025505053056590.989582261860342
5515971915.6065261494123760.8062317029248370.833678512888632
5631592174.1577527732393.041666666670.9085331789485491.45297644385321
5717592144.882716998822394.3750.8958006648911790.820091460507102
5825042966.769025920772377.083333333331.248071106434680.844015822641554
5942734006.051139819042382.458333333331.681477943924461.06663640848904
6052745724.738274526842395.1252.390162632232910.921264824187252
6117711590.58764062282396.083333333330.6638281809715031.11342497248788
6216821560.701605871022371.1250.6582114421934821.07772042629589
6318461773.243383188612344.666666666670.7562880508339241.04103024858357
6415891747.35051229132396.1250.7292401324185080.909376790073073
6518961617.267682715232451.8750.6596044589203091.17234767024888
6613791484.282744736272463.333333333330.6025505053056590.929068268758336
6716451985.849463266742463.1250.8062317029248370.82836087549857
6825122225.565588481842449.6250.9085331789485491.12870185134088
6917712178.400591876832431.791666666670.8958006648911790.812981784252167
7037273021.892166454972421.251.248071106434681.23333322127513
7143884063.221389912472416.458333333331.681477943924461.07993131038684
7254345765.0722689457724122.390162632232910.942572746099103
7316061627.789678264752452.1250.6638281809715030.986613947394005
7415231661.874189631512524.833333333330.6582114421934820.916435196780869
7515771928.313945611682549.708333333330.7562880508339240.817812889643216
7616051811.12863887242483.583333333330.7292401324185080.886187742577615
7717651589.289460249362409.458333333330.6596044589203091.11055918015279
7814031453.226287441982411.791666666670.6025505053056590.965438082233987
7925841952.525219545842421.791666666670.8062317029248371.32341440414328
8033182188.997128029162409.3750.9085331789485491.51576260997077
8115622154.213973924772404.791666666670.8958006648911790.72509045940046
8223493017.003887954772417.333333333331.248071106434680.778586997974468
8339874070.507794336142420.791666666671.681477943924460.979484674012333
8458915746.249738216942404.1252.390162632232911.02519038823189
8513891571.308963867092367.041666666670.6638281809715030.88397637380085
8614421499.734771037852278.50.6582114421934820.961503345689654
8715481713.370579164262265.50.7562880508339240.90348230489348
8819351708.032315151732342.208333333330.7292401324185081.13288254726498
8915181577.444063507922391.50.6596044589203090.96231621463919
9012501485.412526933722465.208333333330.6025505053056590.841517071745938
9118472048.500385181522540.833333333330.8062317029248370.901635173398482
9219302338.753680359182574.208333333330.9085331789485490.825225852644558
9326382339.458086418722611.583333333330.8958006648911791.12761156753113
9431143309.416547599862651.6251.248071106434680.940951359616068
9544054501.456579047792677.083333333331.681477943924460.978572140516306
9672426460.510004815872702.958333333332.390162632232911.12096413357484
9718531816.261562645572736.041666666670.6638281809715031.02022750363164
9817791803.581628040422740.1250.6582114421934820.98637065954862
9921082056.504770228032719.208333333330.7562880508339241.02504017034994
10023361995.383312330142736.250.7292401324185081.17070238362979
10117281838.070275338812786.6250.6596044589203090.940116394451504
10216611681.542716410712790.708333333330.6025505053056590.987783410905812
10322302230.440006141562766.50.8062317029248370.99980272675331
10416452495.248520433072746.458333333330.9085331789485490.659252970808094
10524212441.206111939282725.166666666670.8958006648911790.99172289802141
10637403358.975371117872691.333333333331.248071106434681.1134347789979
10749884472.17083819112659.666666666671.681477943924461.11534200737679
10867576324.27073477862645.958333333332.390162632232911.06842358326656
10917571742.244720467252624.541666666670.6638281809715031.00846911995738
11013941729.258586026072627.208333333330.6582114421934820.806125822514196
11119822002.997390631532648.458333333330.7562880508339240.989517015484024
11216501940.234527315992660.6250.7292401324185080.850412657217534
11316541744.818694958952645.250.6596044589203090.947949494568498
11414061580.414656603582622.8750.6025505053056590.889639939825407
11519712111.285679046792618.708333333330.8062317029248370.933554383265589
11619682375.019296418882614.1250.9085331789485490.82862484652963
11726082334.419207678712605.958333333330.8958006648911791.11719437169699
11838453244.880870804632599.916666666671.248071106434681.18494334710247
11945144367.428774600812597.3751.681477943924461.0335600722905
12066946209.343748212062597.8752.390162632232911.07805273333877
12117201723.9617859829925970.6638281809715030.997701929349475
12213211697.445032986722578.8750.6582114421934820.778228439995876
12318591933.135281935752556.083333333330.7562880508339240.961650235951666
12416281836.257038435322518.041666666670.7292401324185080.886586118350415
12516151634.609783281012478.166666666670.6596044589203090.988003385589893
12614571471.252590059042441.708333333330.6025505053056590.99031261514485
12718991952.961928384932422.333333333330.8062317029248370.97236918569654
12816052235.218753508172460.250.9085331789485490.718050525247678
12924242231.626081382442491.208333333330.8958006648911791.08620347298432
13031163091.836151378082477.291666666671.248071106434681.00781537165582
13142864128.238537077552455.1251.681477943924461.03821520038281
13260475858.189021493182450.958333333332.390162632232911.03223026396282
13319021638.023696054722467.541666666670.6638281809715031.16115536336933
13420491639.7144044112491.166666666670.6582114421934821.2496078551777
13518741891.4764151356425010.7562880508339240.99076043719298
13612791827.4757718407825060.7292401324185080.69987247968365
13714321638.594893553662484.208333333330.6596044589203090.873919481644662
13815401482.977218641442461.166666666670.6025505053056591.03845155585788
13922141976.913728559322452.041666666670.8062317029248371.119927474839
14018572200.997337101112422.583333333330.9085331789485490.843708426492611
14124082160.335278468192411.6250.8958006648911791.11464179842835
14232523053.405961892442446.51.248071106434681.06504016844995
14336274188.631619896842491.041666666671.681477943924460.865915250883134
14461535997.415994820742509.208333333332.390162632232911.02594183983796
14515771664.2172496955625070.6638281809715030.947592629681303
14616671644.047629738772497.750.6582114421934821.01396089130634
14719931885.394598726862492.958333333330.7562880508339241.0570731460384
14819971812.040189037922484.833333333330.7292401324185081.10207268695308
14917831647.389619672592497.541666666670.6596044589203091.08231834091219
15016251515.81622118062515.666666666670.6025505053056591.07202969416329
15120762024.279841106162510.791666666670.8062317029248371.02554990562253
15217732274.096402457342503.041666666670.9085331789485490.779650325326637
15323772234.836033764972494.791666666670.8958006648911791.06361270540082
15430883115.1854816609624961.248071106434680.9912732382001
15540964209.019539966922503.166666666671.681477943924460.973148250110569
15661195976.800842117742500.583333333332.390162632232911.02379185146679
15714941656.140673493742494.833333333330.6638281809715030.902097281898347
15815641669.388770263222536.250.6582114421934820.93686984593373
15918981930.551297762062552.666666666670.7562880508339240.98313885893641
16021211850.051830940242536.958333333330.7292401324185081.1464543665904
16118311683.887733066182552.8750.6596044589203091.08736465266953
16215151548.830967617142570.458333333330.6025505053056590.978157095044922
16320482072.183441454942570.208333333330.8062317029248370.98832948812777
16427952339.170091399532574.666666666670.9085331789485491.19486821855171
16517492314.823568134212584.083333333330.8958006648911790.755565142880294
16633393195.270044323852560.166666666671.248071106434681.04498209969185
16742274266.119728479362537.1251.681477943924460.990830138165555
16864106066.2327606071225382.390162632232911.05666898270459
16911971689.249104019692544.708333333330.6638281809715030.708598866296067
17019681638.836789154742489.833333333330.6582114421934821.20085173400033
17117201880.478726396432486.458333333330.7562880508339240.914660706263899
17217251851.662236232662539.166666666670.7292401324185080.93159538831965
17316741662.423104632152520.333333333330.6596044589203091.00696386818469
17416931495.806523150242482.458333333330.6025505053056591.13183087103702
17520311983.363582182722460.041666666670.8062317029248371.02401799561372
17614952208.795580220412431.166666666670.9085331789485490.676839456483708
17729682163.321280684492414.958333333330.8958006648911791.37196450037273
17833853030.368649386172428.041666666671.248071106434681.11702581159083
17937294092.016699702182433.583333333331.681477943924460.911286603564301
18059995815.763634771042433.208333333332.390162632232911.03150684531494
1811070NA2433NANA
1821402NANANANA
1831897NANANANA
1841862NANANANA
1851670NANANANA
1861688NANANANA
1872031NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/1navl1305571290.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/1navl1305571290.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/2d5cm1305571290.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/2d5cm1305571290.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/3pjjc1305571290.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/3pjjc1305571290.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/44ymj1305571290.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t130557109606lv1ws4ghmtjo0/44ymj1305571290.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