Home » date » 2008 » May » 23 »

Opdracht 9 - Oefening 2 VERBETERING - Katrien De Soomer

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 23 May 2008 09:19:43 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/23/t1211556028dl1146ooh47i251.htm/, Retrieved Fri, 23 May 2008 17:20:29 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
464 675 703 887 1139 1077 1318 1260 1120 963 996 960 530 883 894 1045 1199 1287 1565 1577 1076 918 1008 1063 544 635 804 980 1018 1064 1404 1286 1104 999 996 1015 615 722 832 977 1270 1437 1520 1708 1151 934 1159 1209 699 830 996 1124 1458 1270 1753 2258 1208 1241 1265 1828 809 997 1164 1205 1538 1513 1378 2083 1357 1536 1526 1376 779 1005 1193 1522 1539 1546 2116 2326 1596 1356 1553 1613 814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 2639 2226 2586 2684 1185 1749 2459 2618 2585 3310 3923
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1464NANA0.540338298685658NA
2675NANA0.711390996115013NA
3703NANA0.85001471778678NA
4887NANA0.927746550822544NA
51139NANA1.06547833138027NA
61077NANA1.08810478176136NA
713181296.65328109696966.251.341943887293101.01646293516874
812601315.07403805802977.6666666666671.345114938347780.958120960140506
911201031.77669277184994.2916666666671.037700231593851.08550620288888
10963955.3472357181031008.833333333330.946982226054621.00801045315858
119961053.400473129251017.916666666671.034859244989850.945509353191442
129601142.710297528271029.166666666671.110325795169170.840107945186561
13530566.3871075014621048.208333333330.5403382986856580.935755763117598
14883762.403658794761071.708333333330.7113909961150131.15817912179997
15894920.63677392291083.083333333330.850014717786780.971067010706733
1610451001.386433294081079.3750.9277465508225441.04355318312277
1711991148.5856412279310781.065478331380271.04389255529799
1812871178.190790151351082.791666666671.088104781761361.09235279273799
1915651459.58763474581087.666666666671.341943887293101.07222064831521
2015771449.921810627381077.916666666671.345114938347781.08764485673723
2110761103.940096377261063.833333333331.037700231593850.974690568384146
229181001.315331274501057.3750.946982226054620.916794112032163
2310081083.626986910001047.1251.034859244989850.930209391401693
2410631143.959414047841030.291666666671.110325795169170.929228770659471
25544548.0606335377071014.291666666670.5403382986856580.99259090456562
26635708.160095340991995.4583333333330.7113909961150130.896689892833113
27804836.839489661086984.50.850014717786780.960757719889168
28980917.57999486978989.0416666666670.9277465508225441.06802677202992
2910181056.86571486828991.9166666666671.065478331380270.96322549372025
3010641076.58900615438989.4166666666671.088104781761360.988306581172188
3114041329.02767737791990.3751.341943887293101.05641140805285
3212861341.02354707698996.9583333333331.345114938347780.958968992605006
3311041039.516206999141001.751.037700231593851.06203250374230
34999949.6258847690221002.791666666670.946982226054621.05199322809423
359961048.484891715551013.166666666671.034859244989850.949942157364161
3610151153.859819054761039.208333333331.110325795169170.879656248738677
37615572.5334556490121059.583333333330.5403382986856581.07417303553528
38722769.72505779644410820.7113909961150130.937997266279637
39832936.3266289220471101.541666666670.850014717786780.888578808185608
409771021.255671924201100.791666666670.9277465508225440.956665433406294
4112701177.220371383771104.8751.065478331380271.07881245591016
4214371218.405329377281119.751.088104781761361.17941046821787
4315201518.185851157601131.333333333331.341943887293101.00119494516499
4417081532.534286424241139.333333333331.345114938347781.11449382576958
4511511194.047066487331150.666666666671.037700231593850.96394860161253
469341101.932192792811163.6250.946982226054620.847602063093203
4711591218.632999245971177.583333333331.034859244989850.951065661866317
4812091308.472686032071178.458333333331.110325795169170.923978018728294
49699638.2521012266551181.208333333330.5403382986856581.09517853314794
50830863.5101041176071213.833333333330.7113909961150130.961193153435246
519961053.274487177541239.1250.850014717786780.945622448967673
5211241163.664767475461254.291666666670.9277465508225440.965913922476564
5314581354.755698350011271.51.065478331380271.07620879674154
5412701416.395061958611301.708333333331.088104781761360.896642493404228
5517531787.581086531691332.083333333331.341943887293100.9806548151621
5622581807.330059037541343.6251.345114938347781.2493567451661
5712081408.764539407951357.583333333331.037700231593850.857488931761211
5812411295.432227649971367.958333333330.946982226054620.9579814161728
5912651422.586508779381374.666666666671.034859244989850.889225359718478
6018281541.270994419201388.1251.110325795169171.18603412807937
61809747.0852402202581382.6250.5403382986856581.08287509436204
62997967.2842656758841359.708333333330.7113909961150131.03072078744437
6311641154.851245953071358.6250.850014717786781.00792201946268
6412051277.622968801501377.1250.9277465508225440.943157746397107
6515381491.980428445691400.291666666671.065478331380271.03084462146883
6615131515.004557805731392.333333333331.088104781761360.998676863514766
6713781841.482499337961372.251.341943887293100.748310125399188
6820831844.600952120931371.333333333331.345114938347781.12924152923425
6913571424.632705449411372.8751.037700231593850.952526215921686
7015361313.740550687021387.291666666670.946982226054621.16918062641573
7115261449.363491743501400.541666666671.034859244989851.05287597534578
7213761556.630501252381401.958333333331.110325795169170.883960579529276
73779774.890148506791434.083333333330.5403382986856581.00530378596389
7410051049.272077978141474.958333333330.7113909961150130.957806865438135
7511931270.807420371151495.041666666670.850014717786780.938773240442347
7615221389.300459856761497.50.9277465508225441.09551536473034
7715391588.76137687941491.1251.065478331380270.96867913734337
7815461634.469395303281502.1251.088104781761360.945872712234626
7921162030.976159089471513.458333333331.341943887293101.04186353469981
8023262045.863774771221520.958333333331.345114938347781.13692809300566
8115961585.951853952601528.333333333331.037700231593851.00633571947493
8213561455.235478296681536.708333333330.946982226054620.931807958384276
8315531607.050169198821552.916666666671.034859244989850.966366843901476
8416131744.044242761971570.751.110325795169170.924861858690898
85814853.0590890499831578.750.5403382986856580.954212914965268
8611501114.808973495241567.083333333330.7113909961150131.03156686691751
8712251337.427323877681573.416666666670.850014717786780.915937620033277
8816911496.725779220751613.291666666670.9277465508225441.12979947527889
8917591761.191286841101652.958333333331.065478331380270.998755792821895
9017541843.204162604501693.958333333331.088104781761360.951603753716328
9121002313.734919007861724.166666666671.341943887293100.907623419929406
9220622350.083936660871747.1251.345114938347780.877415469223538
9320121843.777123994031776.791666666671.037700231593851.09123818373533
9418971691.823204439331786.541666666670.946982226054621.12127555351073
9519641859.167752759481796.541666666671.034859244989851.05638665315969
9621862027.223584104911825.791666666671.110325795169171.07832210375808
979661013.336936897621875.3750.5403382986856580.953286083656893
9815491363.588333094961916.791666666670.7113909961150131.13597334503751
9915381631.355329832371919.208333333330.850014717786780.942774374089326
10016121769.444609056301907.250.9277465508225440.91102032341082
10120782019.0814379656018951.065478331380271.02918087449398
10221372041.375245982781876.083333333331.088104781761361.04684330046884
10329072509.4350692381018701.341943887293101.15842806041704
10422492518.335396865871872.208333333331.345114938347780.893050227860408
10518831949.36312255871878.541666666671.037700231593850.965956510723567
10617391795.596673377821896.1250.946982226054620.968480297264447
10718281973.994009818141907.51.034859244989850.926041310615936
10818682120.352160174731909.666666666671.110325795169170.880985732033337
10911381021.194356324341889.916666666670.5403382986856581.11438140345398
11014301329.293358823911868.583333333330.7113909961150131.07575953081206
11118091592.290070094091873.250.850014717786781.13609952983825
11217631755.412442475111892.1250.9277465508225441.00432237879902
11322002042.033617020751916.541666666671.065478331380271.07735738611870
11420672122.983104614891951.083333333331.088104781761360.973629981089727
11525032635.465965986381963.916666666671.341943887293100.949737174489824
11621412619.331110153491947.291666666671.345114938347780.817384251918629
11721032006.782535373561933.8751.037700231593851.04794613413781
11819721824.598004050741926.750.946982226054621.08078601183495
11921811982.919670806181916.1251.034859244989851.09989326956109
12023442118.686671481971908.166666666671.110325795169171.10634575256021
1219701029.254402613061904.833333333330.5403382986856580.942429779787554
12211991359.4681935757919110.7113909961150130.881962524512094
12317181636.384583579281925.1250.850014717786781.04987544935324
12416831786.298671396241925.416666666670.9277465508225440.942171668685452
12520252044.6529179187319191.065478331380270.990388139841976
12620512083.902007869961915.166666666671.088104781761360.984211345953072
12724392568.872000579461914.291666666671.341943887293100.949443958067913
12823532603.133684437551935.251.345114938347780.903910549837322
12922302025.07200195541951.51.037700231593851.10119541322319
13018521838.526534292291941.458333333330.946982226054621.00732840427179
13121471993.656335472951926.51.034859244989851.07691579626770
13222862137.284628551061924.916666666671.110325795169171.06958145371109
13310071052.241294402981947.3750.5403382986856580.957004828983972
13416651397.88330736619650.7113909961150131.19108654579853
13516421674.387324920331969.833333333330.850014717786780.980657208497521
13615181827.853985651831970.208333333330.9277465508225440.830482090974387
13718312091.800334082311963.251.065478331380270.875322548795403
13822072126.474107456371954.291666666671.088104781761361.03786826853958
13928222627.582045648531958.041666666671.341943887293101.07399120216757
14023932626.785288770161952.833333333331.345114938347780.910999467764029
14123062028.141865140531954.458333333331.037700231593851.13700133094004
14217851878.891651677871984.083333333330.946982226054620.950028171345578
14320472073.297378201962003.458333333331.034859244989850.98731615711357
14421712227.637390132952006.291666666671.110325795169170.97457513041224
14512121083.130633811182004.541666666670.5403382986856581.11897859977921
14613351421.38885152931998.041666666670.7113909961150130.939222225194497
14720111687.987560404921985.833333333330.850014717786781.1913594905389
14818601845.558482330031989.291666666670.9277465508225441.00782501221621
14919542143.919982458992012.166666666671.065478331380270.911414612479538
15021522230.025412520662049.458333333331.088104781761360.96501142449652
15128352763.230206922412059.1251.341943887293101.02597315015513
15222242746.836797017702042.083333333331.345114938347780.809658587075374
15321822115.524872142672038.666666666671.037700231593851.03142252248257
15419921946.482508062522055.458333333330.946982226054621.02338448547518
15523892157.207215316552084.541666666671.034859244989851.10745040302001
15627242333.210867823622101.3751.110325795169171.16748984738825
1578911142.770473528612114.916666666670.5403382986856580.779684127862351
15812471543.896309318612170.250.7113909961150130.807696729678924
15920171873.786610801142204.416666666670.850014717786781.07642993517689
16022572038.104547731992196.833333333330.9277465508225441.10740148365382
16122552344.629463132752200.541666666671.065478331380270.961772440147966
16222552385.171019320132192.041666666671.088104781761360.945424869635873
16330572939.416256458272190.416666666671.341943887293101.04000241316057
16433302981.727493126692216.708333333331.345114938347781.11680225898448
16518962329.03169479312244.416666666671.037700231593850.81407221904227
16620962140.495491625462260.333333333330.946982226054620.979212527286535
16723742345.465359634292266.458333333331.034859244989851.01216587584570
16825352532.884456654872281.208333333331.110325795169171.00083523089242
16910411255.543579283462323.6250.5403382986856580.829122952939712
17017281651.464556189502321.458333333330.7113909961150131.04634398208769
17122011976.036297894912324.708333333330.850014717786781.11384593610185
17224552190.486918704592361.083333333330.9277465508225441.12075538047579
17322042530.866196471922375.333333333331.065478331380270.870848092669782
17426602600.97846770282390.3751.088104781761361.02269204956138
17536703224.132017878952402.583333333331.341943887293101.13829085770947
17626653240.998397493222409.458333333331.345114938347780.822277481550521
17726392512.358735708012421.083333333331.037700231593851.05040731743124
17822262309.334531012452438.6250.946982226054620.96391404974319
17925862547.090435866482461.291666666671.034859244989851.01527608269640
18026842780.533372552402504.251.110325795169170.965282426204515
1811185NA2541.875NANA
1821749NANANANA
1832459NANANANA
1842618NANANANA
1852585NANANANA
1863310NANANANA
1873923NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/1sl791211555973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/1sl791211555973.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/2o0bh1211555973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/2o0bh1211555973.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/3wk3n1211555973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/3wk3n1211555973.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/4fw2q1211555973.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/23/t1211556028dl1146ooh47i251/4fw2q1211555973.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