Home » date » 2009 » Dec » 01 »

Klassiek decompositie met moving averages

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 01 Dec 2009 12:46:49 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx.htm/, Retrieved Tue, 01 Dec 2009 20:48:54 +0100
 
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/2009/Dec/01/t12596969296dvfxko3t4cdtdx.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9 7.7 8 8 7.7 7.3 7.4 8.1 8.3 8.2
 
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
18.4NANA1.03502746171878NA
28.4NANA0.99657350194391NA
38.4NANA0.971587648997756NA
48.6NANA0.990637074150072NA
58.9NANA1.02786447326418NA
68.8NANA1.03398937051682NA
78.38.537764238628288.370833333333331.019941969771420.972151463546799
87.58.353950785823258.420833333333330.9920574906469970.897778810563211
97.28.018740137196168.4250.9517792447710570.897896661671538
107.47.848469189604198.404166666666670.9338783368889460.942859023999456
118.88.42117378200398.3751.005513287403451.04498496620574
129.38.69360366838728.351.041150139926611.06975201018398
139.38.642479305351838.351.035027461718781.07608010056107
148.78.358760247554548.38750.996573501943911.04082420626256
158.28.213963915901868.454166666666670.9715876489977560.998299978421523
168.38.432798093702498.51250.9906370741500720.984252191001507
178.58.762544634577118.5251.027864473264180.970037854809765
188.68.780293071305338.491666666666671.033989370516820.979466167035524
198.58.610010128153758.441666666666661.019941969771420.98722299666129
208.28.341550067190178.408333333333330.9920574906469970.983030723780353
218.18.00287714978338.408333333333330.9517792447710571.01213599164387
227.97.867924988289378.4250.9338783368889461.00407667990714
238.68.488208001164138.441666666666661.005513287403451.01317027090059
248.78.802056807962898.454166666666671.041150139926610.98840534545624
258.78.758919894795198.46251.035027461718780.993273155194603
268.58.450112818566068.479166666666670.996573501943911.00590372963120
278.48.258495016480928.50.9715876489977561.01713447586233
288.58.432798093702498.51250.9906370741500721.00796911126660
298.78.73684802274558.51.027864473264180.995782458084474
308.78.745826758954768.458333333333331.033989370516820.994760157019136
318.68.57601206249478.408333333333331.019941969771421.00279709698756
328.58.296080765535518.36250.9920574906469971.02458018915530
338.37.919596465865848.320833333333330.9517792447710571.04803319661219
3487.727843237756038.2750.9338783368889461.03521768672976
358.28.266157150195878.220833333333331.005513287403450.991996625639484
368.18.498388017150968.16251.041150139926610.953121931318392
378.18.388035054345968.104166666666671.035027461718780.965661200450429
3888.02656908023998.054166666666670.996573501943910.996689858397243
397.97.78079775572378.008333333333330.9715876489977561.01532005432073
407.97.875564739493077.950.9906370741500721.00310266772164
4188.10728103287127.88751.027864473264180.986767322800798
4288.090966824294117.8251.033989370516820.988756989582385
437.97.900300507521147.745833333333331.019941969771420.999961962520178
4487.597506949204927.658333333333330.9920574906469971.05297699014770
457.77.213693525993977.579166666666670.9517792447710571.06741435192023
467.27.015761005878217.51250.9338783368889461.02626072837536
477.57.495263629853237.454166666666671.005513287403451.00063191508407
487.37.691496658707837.38751.041150139926610.949100067765796
4977.560013084970937.304166666666671.035027461718780.92592432332105
5077.167024434813287.191666666666670.996573501943910.976695428300485
5176.857789489175827.058333333333330.9715876489977561.02073707731167
527.26.897310628769876.96250.9906370741500721.04388512965728
537.37.135092551908836.941666666666671.027864473264181.02311216664555
547.17.212075859354826.9751.033989370516820.984459972199344
556.87.160842579436867.020833333333331.019941969771420.949608921654966
566.46.981604590428247.03750.9920574906469970.916694710664993
576.16.678317700810257.016666666666670.9517792447710570.91340368537123
586.56.525474879011516.98750.9338783368889460.996096088103343
597.77.030213734429136.991666666666671.005513287403451.0952725323685
607.97.335770360899587.045833333333331.041150139926611.07691484484136
617.57.383195893593987.133333333333331.035027461718781.01582026375697
626.97.212700720319047.23750.996573501943910.95664582069264
636.67.133072656391867.341666666666670.9715876489977560.925267457367874
646.97.359607930039917.429166666666670.9906370741500720.93754994363709
657.77.691852474926937.483333333333331.027864473264181.00105924094353
6687.772153435051437.516666666666671.033989370516821.02931575744774
6787.713311146396387.56251.019941969771421.03716806546013
687.7NANA0.992057490646997NA
697.3NANA0.951779244771057NA
707.4NANA0.933878336888946NA
718.1NANA1.00551328740345NA
728.3NANA1.04115013992661NA
738.2NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/1et901259696807.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/1et901259696807.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/22zqk1259696807.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/22zqk1259696807.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/3wbe21259696807.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/3wbe21259696807.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/4glh71259696807.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t12596969296dvfxko3t4cdtdx/4glh71259696807.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