Home » date » 2011 » May » 16 »

opgave 9 Guy Hendrickx oef 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 09:05:46 +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/t1305536591fy1r0rf2xx508ze.htm/, Retrieved Mon, 16 May 2011 11:03:15 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
12,94 12,79 12,82 12,85 12,85 12,72 12,62 12,67 12,6 12,54 12,64 12,67 12,51 12,59 12,52 12,5 12,58 12,51 12,47 12,44 12,51 12,27 12,51 12,41 12,35 12,39 12,31 12,31 12,21 12,1 12,01 11,85 12,12 11,96 11,99 11,93 11,91 11,83 11,92 11,86 11,94 11,87 11,86 11,92 11,82 11,85 11,77 11,82 11,61 11,56 11,45 11,4 11,38 11,33 11,19 11,15 10,98 10,92 10,99 11 10,9 10,99 11,04 11,03 10,99 11 10,87 10,88 10,91 10,92 10,83 10,9 10,82 10,79 10,77 10,72 10,71 10,63 10,61 10,57 10,65 10,57 10,57 10,57 10,52 10,43 10,35 10,2 10,2 10,17 10,14 10,05 10,12 10,12
 
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
112.94NANA-0.0288657407407412NA
212.79NANA0.00800925925925965NA
312.82NANA0.0128009259259255NA
412.85NANA0.00835648148148155NA
512.85NANA0.034745370370371NA
612.72NANA0.00203703703703664NA
712.6212.666689814814812.7079166666667-0.0412268518518523-0.0466898148148136
812.6712.635925925925912.6816666666667-0.04574074074074030.0340740740740753
912.612.67516203703712.66083333333330.0143287037037043-0.0751620370370372
1012.5412.59578703703712.63375-0.0379629629629631-0.0557870370370352
1112.6412.63078703703712.60791666666670.02287037037037060.00921296296296426
1212.6712.638564814814812.58791666666670.05064814814814770.03143518518519
1312.5112.544050925925912.5729166666667-0.0288657407407412-0.034050925925925
1412.5912.565092592592612.55708333333330.008009259259259650.0249074074074098
1512.5212.556550925925912.543750.0128009259259255-0.0365509259259227
1612.512.537106481481512.528750.00835648148148155-0.0371064814814801
1712.5812.546828703703712.51208333333330.0347453703703710.0331712962962953
1812.5112.497870370370412.49583333333330.002037037037036640.0121296296296318
1912.4712.437106481481512.4783333333333-0.04122685185185230.0328935185185202
2012.4412.417592592592612.4633333333333-0.04574074074074030.022407407407405
2112.5112.460578703703712.446250.01432870370370430.0494212962962965
2212.2712.391620370370412.4295833333333-0.0379629629629631-0.121620370370373
2312.5112.429120370370412.406250.02287037037037060.0808796296296297
2412.4112.424398148148112.373750.0506481481481477-0.0143981481481479
2512.3512.308634259259312.3375-0.02886574074074120.0413657407407406
2612.3912.301759259259312.293750.008009259259259650.0882407407407406
2712.3112.265717592592612.25291666666670.01280092592592550.04428240740741
2812.3112.232106481481512.223750.008356481481481550.0778935185185201
2912.2112.22391203703712.18916666666670.034745370370371-0.0139120370370378
3012.112.14953703703712.14750.00203703703703664-0.0495370370370374
3112.0112.067939814814812.1091666666667-0.0412268518518523-0.0579398148148123
3211.8512.021759259259312.0675-0.0457407407407403-0.171759259259259
3312.1212.042245370370412.02791666666670.01432870370370430.077754629629629
3411.9611.954953703703711.9929166666667-0.03796296296296310.00504629629629783
3511.9911.98578703703711.96291666666670.02287037037037060.00421296296296525
3611.9311.992731481481511.94208333333330.0506481481481477-0.0627314814814799
3711.9111.897384259259311.92625-0.02886574074074120.0126157407407419
3811.8311.930925925925911.92291666666670.00800925925925965-0.100925925925925
3911.9211.926134259259311.91333333333330.0128009259259255-0.00613425925925881
4011.8611.904606481481511.896250.00835648148148155-0.0446064814814822
4111.9411.917245370370411.88250.0347453703703710.0227546296296275
4211.8711.87078703703711.868750.00203703703703664-0.000787037037035532
4311.8611.810439814814811.8516666666667-0.04122685185185230.0495601851851859
4411.9211.782175925925911.8279166666667-0.04574074074074030.137824074074075
4511.8211.81141203703711.79708333333330.01432870370370430.00858796296296482
4611.8511.720370370370411.7583333333333-0.03796296296296310.129629629629632
4711.7711.738703703703711.71583333333330.02287037037037060.031296296296297
4811.8211.720648148148111.670.05064814814814770.0993518518518535
4911.6111.590717592592611.6195833333333-0.02886574074074120.0192824074074061
5011.5611.567592592592611.55958333333330.00800925925925965-0.00759259259259082
5111.4511.505300925925911.49250.0128009259259255-0.0553009259259252
5211.411.427106481481511.418750.00835648148148155-0.0271064814814803
5311.3811.382245370370411.34750.034745370370371-0.00224537037036932
5411.3311.282870370370411.28083333333330.002037037037036640.0471296296296302
5511.1911.175856481481511.2170833333333-0.04122685185185230.0141435185185195
5611.1511.118009259259311.16375-0.04574074074074030.0319907407407385
5710.9811.137245370370411.12291666666670.0143287037037043-0.15724537037037
5810.9211.052453703703711.0904166666667-0.0379629629629631-0.132453703703703
5910.9911.081620370370411.058750.0228703703703706-0.0916203703703697
601111.079398148148111.028750.0506481481481477-0.0793981481481474
6110.910.972800925925911.0016666666667-0.0288657407407412-0.0728009259259252
6210.9910.985092592592610.97708333333330.008009259259259650.00490740740740847
6311.0410.975717592592610.96291666666670.01280092592592550.0642824074074078
6411.0310.968356481481510.960.008356481481481550.0616435185185171
6510.9910.988078703703710.95333333333330.0347453703703710.00192129629629711
661110.94453703703710.94250.002037037037036640.055462962962963
6710.8710.893773148148110.935-0.0412268518518523-0.02377314814815
6810.8810.877592592592610.9233333333333-0.04574074074074030.00240740740740897
6910.9110.918078703703710.903750.0143287037037043-0.00807870370370267
7010.9210.841620370370410.8795833333333-0.03796296296296310.0783796296296302
7110.8310.877870370370410.8550.0228703703703706-0.0478703703703687
7210.910.878564814814810.82791666666670.05064814814814770.0214351851851866
7310.8210.772800925925910.8016666666667-0.02886574074074120.0471990740740758
7410.7910.785925925925910.77791666666670.008009259259259650.00407407407407412
7510.7710.766967592592610.75416666666670.01280092592592550.00303240740740662
7610.7210.737106481481510.728750.00835648148148155-0.0171064814814805
7710.7110.738078703703710.70333333333330.034745370370371-0.028078703703704
7810.6310.68078703703710.678750.00203703703703664-0.0507870370370362
7910.6110.611273148148110.6525-0.0412268518518523-0.00127314814814561
8010.5710.579259259259310.625-0.0457407407407403-0.00925925925925597
8110.6510.606828703703710.59250.01432870370370430.0431712962962969
8210.5710.515370370370410.5533333333333-0.03796296296296310.0546296296296287
8310.5710.53328703703710.51041666666670.02287037037037060.0367129629629623
8410.5710.520648148148110.470.05064814814814770.0493518518518528
8510.52NA10.43125NANA
8610.43NA10.39NANA
8710.35NA10.34625NANA
8810.2NA10.3054166666667NANA
8910.2NANANANA
9010.17NANANANA
9110.14NANANANA
9210.05NANANANA
9310.12NANANANA
9410.12NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/16/t1305536591fy1r0rf2xx508ze/1iszf1305536742.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305536591fy1r0rf2xx508ze/1iszf1305536742.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/16/t1305536591fy1r0rf2xx508ze/2go1i1305536742.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/16/t1305536591fy1r0rf2xx508ze/2go1i1305536742.ps (open in new window)


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


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