Home » date » 2011 » May » 16 »

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: Mon, 16 May 2011 17:03:54 +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/t1305565633mujnbc65n67x6z8.htm/, Retrieved Mon, 16 May 2011 19:07:14 +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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
15939520NANA-8796716.34861111NA
289948768NANA-1362716.21527778NA
380953652NANA-17641067.4402778NA
485942882NANA3340867.47638889NA
58944937NANA8173900.60972222NA
682975432NANA-18098886.6569444NA
72494081644640140.668055554869848.9166667-10229708.2486111-19699324.6680555
821973899111110485.79305655329292.12555781193.6680556-89136586.7930556
93795022133870008.484722251997264.5-18127256.01527784080212.51527777
104594988139850674.701388948748402.7083333-8897728.006944446099206.29861111
118595037356923924.151388948041161.95833338882762.1930555629026448.8486111
124896031357268134.359722250292779.3756975354.98472222-8307821.35972222
138195450644623018.359722253419734.7083333-8796716.3486111137331487.6402778
142496041955142512.451388956505228.6666667-1362716.21527778-30182093.4513889
156597333841616888.809722259257956.25-17641067.440277824356449.1902778
162295051364768418.684722261427551.20833333340867.47638889-41817905.6847222
175496352869125474.943055560951574.33333338173900.60972222-14161946.9430555
189099565943751383.301388961850269.9583333-18098886.656944447244275.6986111
199196751752247386.584722262477094.8333333-10229708.248611139720130.4152778
2028999053120552091.29305664770897.62555781193.6680556-91553038.2930556
219699052947187603.818055665314859.8333333-18127256.015277849802925.1819444
223897985257128013.284722266025741.2916667-8897728.00694444-18148161.2847222
238149695778369632.276388969486870.08333338882762.193055563127324.72361112
247498242477006308.193055670030953.20833336975354.98472222-2023884.19305557
257097619261069716.818055669866433.1666667-8796716.348611119906475.18194444
269099000084672409.326388986035125.5416667-1362716.215277786317590.67361112
271299885081146227.184722298787294.625-17641067.4402778-68147377.1847222
2892986156100217687.22638996876819.753340867.47638889-7231531.22638887
2967994976106076540.15138997902639.54166678173900.60972222-38081564.1513889
309102220678158656.259722296257542.9166667-18098886.656944412863549.7402778
318799248982612787.793055592842496.0416667-10229708.24861115379701.20694445
32421022698144291395.04305688510201.37555781193.6680556276731302.956944
331101894272091342.609722290218598.625-18127256.0152778-61072400.6097222
347910004284903710.868055593801438.875-8897728.00694444-5803668.86805554
3565996442102474622.56805693591860.3758882762.19305556-36478180.5680555
365100062097273676.401388990298321.41666676975354.98472222-46273056.4013889
371299687177458171.984722286254888.3333333-8796716.34861111-64461300.9847222
384499424967848150.784722269210867-1362716.21527778-22853901.7847222
399999613536898210.726388954539278.1666667-17641067.440277863097924.2736111
409197703758869976.518055655529109.04166673340867.4763888933107060.4819444
416397421163276358.6097222551024588173900.60972222697852.39027778
421599803638663396.593055656762283.25-18098886.6569444-22665360.5930556
436597426550607796.668055560837504.9166667-10229708.248611115366468.3319444
4433984410120234540.12638964453346.458333355781193.6680556-86250130.1263889
454593909844524475.609722262651731.625-18127256.01527781414622.39027779
466793582748701605.618055557599333.625-8897728.0069444419234221.3819445
476692103265179627.1930555562968658882762.193055561741404.80694446
488991183664428337.526388957452982.54166676975354.9847222225483498.4736111
497189097546438205.818055555234922.1666667-8796716.3486111125452769.1819445
507288034254030773.534722255393489.75-1362716.2152777818849568.4652778
512887128640330076.434722257971143.875-17641067.4402778-11458790.4347222
524184433460224498.851388956883631.3753340867.47638889-18380164.8513889
538284766764262198.276388956088297.66666678173900.6097222218585468.7236111
542487140138362249.259722256461135.9166667-18098886.6569444-13490848.2597222
55386745145148014.334722255377722.5833333-10229708.2486111-41280563.3347222
5699896846110201981.79305654420788.12555781193.6680556-10305135.7930556
574189036136629308.526388954756564.5416667-18127256.01527785261052.4736111
584588426447779449.576388956677177.5833333-8897728.00694444-1895185.57638889
596988458667815171.859722258932409.66666678882762.193055562069414.14027779
609589640065288724.568055658313369.58333336975354.9847222230607675.4319444
613990449148647510.068055557444226.4166667-8796716.34861111-8743019.06805555
628190039954545150.951388955907867.1666667-1362716.2152777827355248.0486111
632790986336271656.893055653912724.3333333-17641067.4402778-8361793.89305555
648890047055091516.768055651750649.29166673340867.4763888933808953.2319444
658991710157470499.068055649296598.45833338173900.6097222232446601.9319444
66294500527410209.634722245509096.2916667-18098886.6569444-24465204.6347222
674934411NANA-10229708.2486111NA
6861957264NANA55781193.6680556NA
6931946515NANA-18127256.0152778NA
703938309NANA-8897728.00694444NA
7152933321NANA8882762.19305556NA
7221947613NANA6975354.98472222NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305565633mujnbc65n67x6z8/11sdj1305565430.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305565633mujnbc65n67x6z8/11sdj1305565430.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305565633mujnbc65n67x6z8/22r6l1305565430.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305565633mujnbc65n67x6z8/22r6l1305565430.ps (open in new window)


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


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