Home » date » 2010 » May » 28 »

Katleen van den Akker - Opgave 9 - Oefening 2

*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 08:24:59 +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/t1275035277g2mrh2k57aq19qb.htm/, Retrieved Fri, 28 May 2010 10:28:02 +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/t1275035277g2mrh2k57aq19qb.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 «
285708 905858 225733 405481 845758 805651 395747 695853 175625 405534 965639 575634 576023 566089 336141 26271 586226 376484 176583 287042 997142 207694 418003 838258 848182 658215 208304 398599 438399 578393 988390 958304 318251 78307 408520 748640 258520 518618 388588 238842 328957 499266 109011 168896 798921 878732 897576 518317 228370 758167 658491 518170 398212 498286 78136 647990 357927 698061 407932 637934 397784 217980 47737 467672 67651 167524 687406 367345 157553 887453 227566 817279 697059 997185 847075 547122 996977 346998 967154 547097 586853 46728 236883 36784 277085 446998 586725 496845 86765 146966 197113 657096 337200 17273 457284 507696 547628 157435 67793 267631 518397 918560 918895 429509 289569 9010172 1810617 7111400 1611919 9712714 2913310 1013816 6714518 2414721 9114534 8214993 6215159 515612 9415340 3715267
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1285708NANA0.984781292930434NA
2905858NANA1.28454386991626NA
3225733NANA0.850732143088349NA
4405481NANA0.766833504424508NA
5845758NANA0.852592036471024NA
6805651NANA0.75170531161351NA
7395747520351.181491217569448.2083333330.9137814007953170.760538294284012
8695853615721.025576262567387.6251.085185856100161.13014331344092
9175625527141.69936381557830.9166666670.9449847321366830.333164688378772
10405534605567.288066510546630.8333333331.107817655242360.669676199477043
11965639557992.47287654520016.5833333331.073028227868771.73055918661766
12575634679994.839129537491320.7916666671.384013969412630.846527012965084
13576023457240.8477766514643070.9847812929304341.25978027291510
14566089562811.817412931438141.3751.284543869916261.00582287451271
15336141387370.211756318455337.4583333330.8507321430883490.867751287524026
1626271369095.3696836224813240.7668335044245080.0711767260112712
17586226383890.221821534450262.50.8525920364710241.52706676720859
18376484329537.8364423124383870.751705311613511.14246061716165
19176583420951.335236353460669.6250.9137814007953170.419485544334604
20287042516383.700117858475848.1666666671.085185856100160.555869598390666
21997142448263.154408176474360.2083333330.9449847321366832.22445675089332
22207694536790.090667271484547.3333333331.107817655242360.386918468896884
23418003529970.295996237493901.5416666671.073028227868770.788729110212184
24838258686685.393326673496154.9583333331.384013969412631.22073078610137
25848182530199.477742356538393.1250.9847812929304341.59974129663734
26658215770967.38801601600187.6666666671.284543869916260.853752065562507
27208304510328.513438545599869.7916666670.8507321430883490.408176291378406
28398599434174.644071765566191.5416666670.7668335044245080.918061442422961
29438399477797.088871221560405.2916666670.8525920364710240.917542216583408
30578393418155.686565226556276.0833333330.751705311613511.38320012995872
31988390482451.679076756527972.750.9137814007953172.04868185326131
32958304539974.329363233497586.9583333331.085185856100161.77472140412690
33318251471814.10327685499282.250.9449847321366830.674526254704297
3478307554061.198707844500137.5416666671.107817655242360.141332762847541
35408520524625.944778809488920.9166666671.073028227868770.778688137835499
36748640665799.12317977481063.8751.384013969412631.12442322907335
37258520434412.755722892441126.1250.9847812929304340.595102230757026
38518618477327.938435083371593.3333333331.284543869916261.08650250329006
39388588305182.503640976358729.250.8507321430883491.27329711029943
40238842316018.381598355412108.2083333330.7668335044245080.755785150192805
41328957397168.56124687465836.5833333330.8525920364710240.828255385993476
42499266358275.62446846476617.1250.751705311613511.39352488950571
43109011425606.55650848465764.0833333330.9137814007953170.256130922639647
44168896514908.796891186474489.0416666671.085185856100160.328011486732654
45798921468444.248347687495716.2083333330.9449847321366831.70547723196086
46878732574515.159190066518600.8333333331.107817655242361.52951925801020
47897576572058.308111067533125.1251.073028227868771.56902886868961
48518317741789.851851588535969.9166666671.384013969412630.698738326907849
49228370526506.055503221534642.6250.9847812929304340.433746198382713
50758167710761.780240938553318.4166666671.284543869916261.06669635463937
51658491472076.299698238554905.9166666670.8507321430883491.39488256542623
52518170405657.384098058529003.2083333330.7668335044245081.27735872761716
53398212427211.204737327501073.4166666670.8525920364710240.932119746823688
54498286365069.912927479485655.6250.751705311613511.36490568615821
5578136454787.708652178497698.5833333330.9137814007953170.171807633569443
56647990523330.562591761482249.7083333331.085185856100161.23820400778978
57357927410401.041761113434293.8333333330.9449847321366830.872139599022613
58698061450595.599456035406741.6666666671.107817655242361.54919622127404
59407932419408.328805247390864.2083333331.073028227868770.972636860031037
60637934502824.846547829363309.0833333331.384013969412631.26870023305286
61397784369207.883332182374913.5833333330.9847812929304341.07739844666889
62217980499181.829771307388606.2916666671.284543869916260.436674548229979
6347737313549.099796524368563.8333333330.8507321430883490.1522472876847
64467672282276.205688064368106.250.7668335044245081.65678860129221
6567651314165.102980261368482.3333333330.8525920364710240.215335819791068
66167524276958.148405608368439.7916666670.751705311613510.604871172646126
67687406354896.514523262388382.2916666670.9137814007953171.93691955787
68367345470231.604763388433318.9583333331.085185856100160.78120014962593
69157553471633.926187923499091.5833333330.9449847321366830.334057817412446
70887453593466.503500159535707.751.107817655242361.49537167601872
71227566619931.417787923577740.0833333331.073028227868770.36708254085914
72817279863541.791409812623940.0833333331.384013969412630.946426690786692
73697059633287.573430377643074.3333333330.9847812929304341.10069900191502
74997185850650.85562659662220.1666666671.284543869916261.17226120846663
75847075584961.1529685687597.3333333330.8507321430883491.44808761351305
76547122514127.069646369670454.6250.7668335044245081.06417660594360
77996977542088.780762737635812.6250.8525920364710241.83913970438056
78346998453789.619120117603680.2083333330.751705311613510.76466711749118
79967154505924.819551936553660.6666666670.9137814007953171.91165557138815
80547097556957.849739819513237.2916666671.085185856100160.982295159778382
81586853453087.025845187479464.9166666670.9449847321366831.29523240906156
8246728516821.446636182466522.1251.107817655242360.0904142045654972
83236883457648.41698543426501.751.073028227868770.51760913226876
8436784526259.663084909380241.5833333331.384013969412630.0698970538315135
85277085334650.225428544339821.8750.9847812929304340.827983903627055
86446998401188.90202023312320.1251.284543869916261.11418336287244
87586725260750.429824585306501.2083333330.8507321430883492.2501401067477
88496845226117.505456891294871.7083333330.7668335044245082.19728675582228
8986765258188.563597106302827.7916666670.8525920364710240.336052839797326
90146966249289.911753667331632.50.751705311613510.589538497431146
91197113331269.934921198362526.4583333330.9137814007953170.595022304233219
92657096392548.575254458361733.9583333331.085185856100161.67392277394984
93337200309999.091428332328046.6666666670.9449847321366831.08774512353033
9417273328882.166264282296873.9166666671.107817655242360.0525203302939808
95457284327604.1021941593053081.073028227868771.39584332716623
96507696491937.26998845355442.4166666671.384013969412631.0320340233866
97547628411310.073818621417666.4166666670.9847812929304341.33142374782071
98157435562961.466773777438257.8751.284543869916260.279655019556186
9967793363084.361267575426790.4583333330.8507321430883490.186714183346608
100267631613091.023171042799509.9583333330.7668335044245080.436527350564935
1015183971049202.282332681230602.958333330.8525920364710240.494086801686565
1029185601174273.571000021562146.166666670.751705311613510.782236799571117
1039188951719413.079606681881645.958333330.9137814007953170.534423641938445
1044295092522110.878582432324128.041666671.085185856100160.170297429683745
1052895692684538.968503302840827.8750.9449847321366830.107865448554633
10690101723312908.895761682990482.1251.107817655242362.71971620213493
10718106173519258.831082933279744.8751.073028227868770.514488159838713
10871114004982805.462470363600256.6251.384013969412631.42718796741351
10916119193943144.679666494004081.6250.9847812929304340.408790224794981
11097127145998770.738705914669961.751.284543869916261.61911738638895
11129133104458905.374720745241256.50.8507321430883490.653368877598678
11210138163937088.911655175134216.083333330.7668335044245080.257503963651608
11367145184345780.582006565097139.541666670.8525920364710241.54506604125414
11424147213963364.344897905272497.458333330.751705311613510.609260413594958
1159114534NANA0.913781400795317NA
1168214993NANA1.08518585610016NA
1176215159NANA0.944984732136683NA
118515612NANA1.10781765524236NA
1199415340NANA1.07302822786877NA
1203715267NANA1.38401396941263NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/28/t1275035277g2mrh2k57aq19qb/1cb4l1275035096.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275035277g2mrh2k57aq19qb/1cb4l1275035096.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/May/28/t1275035277g2mrh2k57aq19qb/3nl361275035096.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/28/t1275035277g2mrh2k57aq19qb/3nl361275035096.ps (open in new window)


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