Home » date » 2008 » Aug » 17 »

Maarten Verhaegen 2MAR03 - tweede zit - Oefening 9 - Additief decompositiemodel evolutie prijzen diesel

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 17 Aug 2008 13:07:09 -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/Aug/17/t1219000129ijebpk7x9fhewho.htm/, Retrieved Sun, 17 Aug 2008 19:08:54 +0000
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
0.6200 0.6200 0.6100 0.6100 0.6100 0.6000 0.5900 0.5900 0.5900 0.5900 0.5900 0.5700 0.5800 0.5700 0.5900 0.6200 0.6200 0.6100 0.6400 0.6500 0.6700 0.6700 0.6900 0.7400 0.7300 0.7400 0.7500 0.7400 0.7600 0.7600 0.7800 0.7900 0.8900 0.8800 0.8800 0.8400 0.7600 0.7700 0.7600 0.7700 0.7800 0.7900 0.7800 0.7600 0.7800 0.7600 0.7400 0.7300 0.7200 0.7100 0.7300 0.7500 0.7500 0.7200 0.7200 0.7200 0.7400 0.7800 0.7400 0.7400 0.7500 0.7800 0.8100 0.7500 0.7000 0.7100 0.7100 0.7300 0.7400 0.7400 0.7500 0.7400 0.7400 0.7300 0.7600 0.8000 0.8300 0.8100 0.8300 0.8800 0.8900 0.9300 0.9100 0.9000 0.8600 0.8800 0.9300 0.9800 0.9700 1.0300 1.0600 1.0600 1.0800 1.0900 1.0400 1.0000
 
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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.62NANA-0.0145717592592592NA
20.62NANA-0.0149189814814815NA
30.61NANA-0.00234953703703700NA
40.61NANA-0.0017939814814814NA
50.61NANA-0.00471064814814813NA
60.6NANA-0.0158912037037038NA
70.590.5873726851851850.5975-0.01012731481481480.00262731481481482
80.590.591192129629630.59375-0.00255787037037041-0.00119212962962967
90.590.6137615740740740.5908333333333330.0229282407407408-0.0237615740740741
100.590.616817129629630.5904166666666670.0264004629629629-0.0268171296296297
110.590.6043865740740740.591250.0131365740740740-0.0143865740740741
120.570.5965393518518520.5920833333333330.00445601851851854-0.0265393518518520
130.580.5800115740740740.594583333333333-0.0145717592592592-1.15740740741499e-05
140.570.5842476851851850.599166666666667-0.0149189814814815-0.0142476851851852
150.590.6026504629629630.605-0.00234953703703700-0.012650462962963
160.620.6098726851851850.611666666666667-0.00179398148148140.0101273148148148
170.620.6144560185185180.619166666666667-0.004710648148148130.0055439814814815
180.610.6145254629629630.630416666666667-0.0158912037037038-0.00452546296296297
190.640.6336226851851850.64375-0.01012731481481480.00637731481481485
200.650.6545254629629630.657083333333333-0.00255787037037041-0.00452546296296308
210.670.6937615740740740.6708333333333330.0229282407407408-0.0237615740740739
220.670.7089004629629630.68250.0264004629629629-0.0389004629629629
230.690.7064699074074070.6933333333333330.0131365740740740-0.0164699074074074
240.740.7098726851851850.7054166666666670.004456018518518540.0301273148148149
250.730.7029282407407410.7175-0.01457175925925920.0270717592592594
260.740.7142476851851850.729166666666667-0.01491898148148150.0257523148148149
270.750.741817129629630.744166666666667-0.002349537037037000.00818287037037047
280.740.7602893518518520.762083333333333-0.0017939814814814-0.0202893518518519
290.760.7740393518518520.77875-0.00471064814814813-0.0140393518518517
300.760.774942129629630.790833333333333-0.0158912037037038-0.0149421296296295
310.780.7861226851851850.79625-0.0101273148148148-0.006122685185185
320.790.796192129629630.79875-0.00255787037037041-0.00619212962962967
330.890.8233449074074070.8004166666666670.02292824074074080.0666550925925926
340.880.8284837962962960.8020833333333330.02640046296296290.0515162037037037
350.880.817303240740740.8041666666666670.01313657407407400.0626967592592593
360.840.8107060185185190.806250.004456018518518540.0292939814814814
370.760.792928240740740.8075-0.0145717592592592-0.0329282407407405
380.770.7913310185185180.80625-0.0149189814814815-0.0213310185185184
390.760.798067129629630.800416666666667-0.00234953703703700-0.0380671296296295
400.770.7890393518518520.790833333333333-0.0017939814814814-0.0190393518518519
410.780.7752893518518520.78-0.004710648148148130.00471064814814826
420.790.753692129629630.769583333333333-0.01589120370370380.0363078703703704
430.780.7532060185185190.763333333333333-0.01012731481481480.0267939814814815
440.760.7566087962962960.759166666666667-0.002557870370370410.00339120370370360
450.780.7783449074074070.7554166666666670.02292824074074080.00165509259259278
460.760.7797337962962960.7533333333333330.0264004629629629-0.0197337962962962
470.740.7643865740740740.751250.0131365740740740-0.0243865740740741
480.730.7515393518518520.7470833333333330.00445601851851854-0.0215393518518519
490.720.7270949074074070.741666666666667-0.0145717592592592-0.00709490740740737
500.710.7225810185185180.7375-0.0149189814814815-0.0125810185185184
510.730.731817129629630.734166666666667-0.00234953703703700-0.00181712962962965
520.750.7315393518518520.733333333333333-0.00179398148148140.0184606481481482
530.750.7294560185185190.734166666666667-0.004710648148148130.0205439814814814
540.720.718692129629630.734583333333333-0.01589120370370380.0013078703703705
550.720.7261226851851850.73625-0.0101273148148148-0.00612268518518511
560.720.7378587962962960.740416666666667-0.00255787037037041-0.0178587962962962
570.740.7695949074074070.7466666666666670.0229282407407408-0.0295949074074074
580.780.7764004629629630.750.02640046296296290.00359953703703708
590.740.7610532407407410.7479166666666670.0131365740740740-0.0210532407407408
600.740.7498726851851850.7454166666666670.00445601851851854-0.00987268518518514
610.750.7300115740740740.744583333333333-0.01457175925925920.0199884259259259
620.780.7296643518518520.744583333333333-0.01491898148148150.0503356481481483
630.810.7426504629629630.745-0.002349537037037000.0673495370370371
640.750.7415393518518520.743333333333333-0.00179398148148140.00846064814814818
650.70.7373726851851850.742083333333333-0.00471064814814813-0.0373726851851851
660.710.7266087962962960.7425-0.0158912037037038-0.0166087962962963
670.710.7319560185185180.742083333333333-0.0101273148148148-0.0219560185185184
680.730.7370254629629630.739583333333333-0.00255787037037041-0.00702546296296291
690.740.7583449074074070.7354166666666670.0229282407407408-0.0183449074074074
700.740.761817129629630.7354166666666670.0264004629629629-0.0218171296296296
710.750.7560532407407410.7429166666666670.0131365740740740-0.00605324074074065
720.740.7569560185185180.75250.00445601851851854-0.0169560185185184
730.740.7470949074074070.761666666666666-0.0145717592592592-0.00709490740740726
740.730.7579976851851850.772916666666667-0.0149189814814815-0.0279976851851851
750.760.783067129629630.785416666666667-0.00234953703703700-0.0230671296296295
760.80.7977893518518520.799583333333333-0.00179398148148140.00221064814814820
770.830.8094560185185180.814166666666667-0.004710648148148130.0205439814814815
780.810.8116087962962960.8275-0.0158912037037038-0.00160879629629618
790.830.8290393518518520.839166666666667-0.01012731481481480.000960648148148224
800.880.8478587962962960.850416666666667-0.002557870370370410.0321412037037038
810.890.886678240740740.863750.02292824074074080.00332175925925937
820.930.9047337962962960.8783333333333340.02640046296296290.0252662037037036
830.910.904803240740740.8916666666666670.01313657407407400.00519675925925922
840.90.9111226851851850.9066666666666670.00445601851851854-0.011122685185185
850.860.9108449074074070.925416666666667-0.0145717592592592-0.0508449074074073
860.880.9275810185185180.9425-0.0149189814814815-0.0475810185185184
870.930.955567129629630.957916666666667-0.00234953703703700-0.0255671296296296
880.980.9707060185185180.9725-0.00179398148148140.00929398148148153
890.970.9798726851851850.984583333333333-0.00471064814814813-0.00987268518518525
901.030.9782754629629630.994166666666667-0.01589120370370380.0517245370370372
911.06NANA-0.0101273148148148NA
921.06NANA-0.00255787037037041NA
931.08NANA0.0229282407407408NA
941.09NANA0.0264004629629629NA
951.04NANA0.0131365740740740NA
961NANA0.00445601851851854NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/1okto1219000025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/1okto1219000025.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/2rvt51219000025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/2rvt51219000025.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/3543s1219000025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/3543s1219000025.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/4edgo1219000025.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Aug/17/t1219000129ijebpk7x9fhewho/4edgo1219000025.ps (open in new window)


 
Parameters (Session):
par1 = 4 ;
 
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