Home » date » 2011 » May » 19 »

IKO opgave 9 oplossing 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 May 2011 14:12:00 +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/19/t1305814168wdnn9oxo3e3ylk0.htm/, Retrieved Thu, 19 May 2011 16:09:32 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
5939520.00 89948768.00 80953652.00 85942882.00 8944937.00 82975432.00 24940816.00 21973899.00 37950221.00 45949881.00 85950373.00 48960313.00 81954506.00 24960419.00 65973338.00 22950513.00 54963528.00 90995659.00 91967517.00 28999053.00 96990529.00 38979852.00 81496957.00 74982424.00 70976192.00 90990000.00 12998850.00 92986156.00 67994976.00 91022206.00 87992489.00 421022698.00 11018942.00 79100042.00 65996442.00 51000620.00 12996871.00 44994249.00 99996135.00 91977037.00 63974211.00 15998036.00 65974265.00 33984410.00 45939098.00 67935827.00 66921032.00 89911836.00 71890975.00 72880342.00 28871286.00 41844334.00 82847667.00 24871401.00 3867451.00 99896846.00 41890361.00 45884264.00 69884586.00 95896400.00 39904491.00 81900399.00 27909863.00 88900470.00 89917101.00 2945005.00 4934411.00 61957264.00 31946515.00 3938309.00 52933321.00 21947613.00
 
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' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
15939520NANA0.931926222047411NA
289948768NANA0.978174594733034NA
380953652NANA0.812314674550418NA
485942882NANA1.08001423064022NA
58944937NANA1.20205026478045NA
682975432NANA0.635689388963795NA
72494081643858541.322813354869848.91666670.7993195204423330.568664968048696
82197389987434453.004458855329292.1251.580256129193320.25131853914474
93795022139567482.489886451997264.50.7609531553315920.959126500143147
104594988142221872.867860248748402.70833330.8661180781753611.0882956600198
118595037357588475.540182748041161.95833331.198731945537241.4924925897722
124896031358060589.455426150292779.3751.154451795604830.843262417058089
138195450649783251.549512153419734.70833330.9319262220474111.64622646069014
142496041955271979.151314156505228.66666670.9781745947330340.451592640308169
156597333848136107.445741759257956.250.8123146745504181.37055822543117
162295051366342629.45838161427551.20833331.080014230640220.345939152357499
175496352873266856.066168560951574.33333331.202050264780450.750182701307144
189099565939317560.317058761850269.95833330.6356893889637952.31437704339249
199196751749939161.480810262477094.83333330.7993195204423331.84159113355037
2028999053102354607.96525964770897.6251.580256129193320.283319467256841
219699052949701548.680215765314859.83333330.7609531553315921.95145888962225
223897985257186088.157641966025741.29166670.8661180781753610.681631726453229
238149695783296130.964287769486870.08333331.198731945537240.97840026969489
247498242480847359.67927870030953.20833331.154451795604830.927456682536767
257097619265110361.108939669866433.16666670.9319262220474111.09009059067029
269099000084157374.059525486035125.54166670.9781745947330341.08118867795996
271299885080246369.083023198787294.6250.8123146745504180.161986768355231
2892986156104628343.94916896876819.751.080014230640220.888728163805938
2967994976117683893.78376597902639.54166671.202050264780450.577776395850187
309102220661189898.639852196257542.91666670.6356893889637951.48753647290271
318799248974210819.412694292842496.04166670.7993195204423331.18570970778081
32421022698139868788.21897888510201.3751.580256129193323.01012615724423
331101894268652127.293288290218598.6250.7609531553315920.160504013996916
347910004281243121.968498693801438.8750.8661180781753610.973621398137192
3565996442112191552.87377493591860.3751.198731945537240.588247869910958
3651000620104245059.29957390298321.41666671.154451795604830.489237766688182
371299687180383192.217604786254888.33333330.9319262220474110.16168642525189
384499424967700311.7788469692108670.9781745947330340.66460918447437
399999613544303055.994170654539278.16666670.8123146745504182.25709339358345
409197703759972227.979772755529109.04166671.080014230640221.53366049750598
416397421166235924.2289535551024581.202050264780450.965853677512892
421599803636083181.155382456762283.250.6356893889637950.443365454146319
436597426548628605.254898160837504.91666670.7993195204423331.35669663265439
4433984410101852795.78780264453346.45833331.580256129193320.333662024072491
454593909847675032.867031862651731.6250.7609531553315920.963588176816292
466793582749887824.143466457599333.6250.8661180781753611.36177169813282
476692103267484850.5090975562968651.198731945537240.991645258086162
488991183666326698.858079857452982.54166671.154451795604831.35559039644632
497189097551474872.339864555234922.16666670.9319262220474111.39662269631943
507288034254184504.387054755393489.750.9781745947330341.34504029933347
512887128647090810.870136157971143.8750.8123146745504180.613098085730979
524184433461435131.375492756883631.3751.080014230640220.68111409649711
538284766767420953.061301256088297.66666671.202050264780451.22881186394195
542487140135891744.991067656461135.91666670.6356893889637950.692956026690532
55386745144264494.658498555377722.58333330.7993195204423330.087371402968394
569989684685998783.990062154420788.1251.580256129193321.16160765728436
574189036141667180.563099254756564.54166670.7609531553315921.00535626442405
584588426449089128.124880356677177.58333330.8661180781753610.934713362259617
596988458670644162.094921158932409.66666671.198731945537240.989247857538455
609589640067319974.22324758313369.58333331.154451795604831.4244865822733
613990449153533780.902920357444226.41666670.9319262220474110.745407672070911
628190039954687655.308142455907867.16666670.9781745947330341.49760304292669
632790986343794097.120958153912724.33333330.8123146745504180.637297371901828
648890047055891437.679871451750649.29166671.080014230640221.59059193483614
658991710159256989.22961549296598.45833331.202050264780451.51740920639049
66294500528929649.613944145509096.29166670.6356893889637950.101798847870612
674934411NANA0.799319520442333NA
6861957264NANA1.58025612919332NA
6931946515NANA0.760953155331592NA
703938309NANA0.866118078175361NA
7152933321NANA1.19873194553724NA
7221947613NANA1.15445179560483NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/19ufc1305814317.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/19ufc1305814317.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/25h421305814317.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/25h421305814317.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/3xyne1305814317.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/3xyne1305814317.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/4fy191305814317.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814168wdnn9oxo3e3ylk0/4fy191305814317.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